Sha256: 34372303d9153b4215dfffb1824f7398d961f730c3837cffbceae61ff119a324
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
= Savon Savon is a lightweight SOAP client. Instantiate Savon::Service and pass in the WSDL of the service you would like to use. Then just call the SOAP service method on your Savon::Service instance (catched via method_missing) and pass in a Hash of options for the service method to receive. == Install $ gem install smacks-savon --s http://gems.github.com == Dependencies Hpricot 0.6.164 (also available for JRuby) === Usage example proxy = Savon::Service.new "http://example.com/ExampleService?wsdl" response = proxy.findExampleById(:id => 123) === Check for available SOAP service methods proxy.wsdl.service_methods => [ "findExampleById", "findExampleByName" ] === Checking for HTTP and SOAP faults response.success? response.fault? === Access the fault message and code response.fault response.fault_code === Working with different response formats # raw XML response: response.to_s # response as a Hash response.to_hash # response as a Hash starting at a custom root node (via XPath) response.to_hash("//item") # response as a Mash response.to_mash # response as a Mash starting at a custom root node (via XPath) response.to_mash("//user/email")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smacks-savon-0.0.5 | README.rdoc |