Skip to content

ericman93/ruby2soap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby2soap

I started this project when I needed to call a WCF method which required cookies on init. Unfortunalty, I could not find any gem that will help me so, so I implemented it myself.

While working I noticed that I need more features - authentication, for example.

Please post any bugs, questions and feature requests using the ‘Issues’ page.

Thank you, Eric

Examples

Initialize the handler:

handler = WcfHandler.new('http://www.webservicex.net/CurrencyConvertor.asmx')

Simple objects:

handler.ConversionRate(:FromCurrency => 'ILS', :ToCurrency => 'GBP')

Statefull:

handler.Init(:userName => 'ericman93')
handler.IncreaseScore() #the cookies saved automaticly

Complex type :

handler = WcfHandler.new('http://localhost:1659/Service1.svc')
res = handler.GetDataUsingDataContract(:composite => {:BoolValue => true,:StringValue => "ruby2soap"})

Result

The object that the soap service function returns is actually a HTTP response with ‘result’ function that returns the actual value. If the value is a complex object, then it would be represented as a hash

Authentication

Available authentications

  1. NTLM

  2. Basic

  3. Digest

NTLM Auth:

handler.ConversionRate({:FromCurrency => 'ILS', :ToCurrency => 'GBP'},SecutryProtocol::NTLM,'user','password')

With domain:

handler.ConversionRate({:FromCurrency => 'ILS', :ToCurrency => 'GBP'},SecutryProtocol::NTLM,'user','password','domain')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages