Sha256: 79e59796009f22d3bb76c612900aaee677b1d3d2f629bc942658d3bc290c22ed

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 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

  $ gem install smacks-savon -s http://gems.github.com

== Dependencies

  smacks-apricoteatsgorilla >= 0.5.2
  hpricot 0.8.241 (the latest JRuby-compatible version)

Hpricot 0.8.241 is also available at: {Apricot eats Gorilla Downloads}[http://github.com/smacks/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

1 entries across 1 versions & 1 rubygems

Version Path
rubiii-savon-0.2.0 README.rdoc