Sha256: a8897944de2a7c0d4e901b78a89020bd2c5681834e6127254f7012a2fbf0c178
Contents?: true
Size: 1.84 KB
Versions: 7
Compression:
Stored size: 1.84 KB
Contents
= Savon Savon::Service is a SOAP client library to enjoy. The goal is to minimize the overhead of working with SOAP services and provide a lightweight alternative to other libraries. == Install The gem for Savon is in the {gemcutter}[http://gemcutter.org] repository. Please follow the steps on their website to set up your rubygems installation. Afterwards you can install the gem like this: $ gem install savon == Dependencies rubiii-apricoteatsgorilla >= 0.5.10 hpricot 0.8.241 (the latest JRuby-compatible version) Hpricot 0.8.241 is also available at: {Apricot eats Gorilla Downloads}[http://github.com/rubiii/apricoteatsgorilla/downloads] == How to use Instantiate a new Savon::Service instance passing in the WSDL of your service. proxy = Savon::Service.new("http://example.com/ExampleService?wsdl") Call the SOAP service method of your choice on your Savon::Service instance. response = proxy.get_all_users Or pass in a Hash of options for the SOAP service to receive. response = proxy.find_user_by_id(:id => 123) Or specify a custom XPath-Expression to start translating the SOAP response at. By default the response is translated starting at "//return". response = proxy.find_user_by_id(nil, "//user/email") === Check for available SOAP actions Access the WSDL to get an Array of SOAP actions found in the WSDL document. proxy.wsdl.soap_actions # => [ "getAllUsers", "findUserById" ] === Handle HTTP error and SOAP faults Savon::Service raises a Savon::SOAPFault in case of a SOAP fault and a Savon::HTTPError in case of an HTTP error. === Logging request and response You should specify the logger to use before working with any service. # example for Ruby on Rails Savon.logger = RAILS_DEFAULT_LOGGER Of course you can also specify the log level if needed. By default it's set to :debug. Savon.log_level = :info
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
savon-0.3.2 | README.rdoc |
savon-0.3.1 | README.rdoc |
savon-0.3.0 | README.rdoc |
savon-0.2.12 | README.rdoc |
savon-0.2.11 | README.rdoc |
savon-0.2.10 | README.rdoc |
savon-0.2.9 | README.rdoc |