Sha256: d67960dd11365aa7203ae66a6a2689ee259b8abcd965e103a4750ed1795fc111
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 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) smacks-apricoteatsgorilla >= 0.3.5 == How to use === 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.75 | README.rdoc |