Sha256: 83f573843dfe94048bf8de1ba99f60eab9dd3ea8f622802dc0ed20770bf76d67

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

= Apricot eats Gorilla

Apricot eats Gorilla is a SOAP communication helper. It translates between
SOAP messages (XML) and Ruby Hashes and comes with some additional helpers
for working with SOAP services.

== Install

  $ gem install rubiii-apricoteatsgorilla -s http://gems.github.com

== Dependencies

  hpricot 0.8.241 (the latest JRuby-compatible version)

Also available at: {GitHub Downloads}[http://github.com/rubiii/apricoteatsgorilla/downloads]

== Translate an XML String into a Ruby Hash

  xml = '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
      <ns2:authenticateResponse xmlns:ns2="http://v1_0.ws.example.com/">
        <return>
          <apricot>
            <eats>Gorilla</eats>
          </apricot>
        </return>
      </ns2:authenticateResponse>
    </soap:Body>
  </soap:Envelope>'

  ApricotEatsGorilla[xml, "//return"]
  # => { :apricot => { :eats => "Gorilla" } }

== Translate a Ruby Hash into an XML String

  hash = { :apricot => { :eats => "Gorilla" } }

  ApricotEatsGorilla[hash]
  # => "<apricot><eats>Gorilla</eats></apricot>"

== Build a SOAP request envelope

  ApricotEatsGorilla.soap_envelope { "<apricot><eats>Gorilla</eats></apricot>" }

  # => '<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  # =>    <env:Body>
  # =>      <apricot><eats>Gorilla</eats></apricot>
  # =>    </env:Body>
  # =>  </env:Envelope>'

== Read more

For more detailed information, please take a look at the
{GitHub Wiki}[http://wiki.github.com/rubiii/apricoteatsgorilla].

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rubiii-apricoteatsgorilla-0.5.4 README.rdoc
rubiii-apricoteatsgorilla-0.5.5 README.rdoc
rubiii-apricoteatsgorilla-0.5.6 README.rdoc
rubiii-apricoteatsgorilla-0.5.7 README.rdoc
rubiii-apricoteatsgorilla-0.5.8 README.rdoc
apricoteatsgorilla-0.5.9 README.rdoc