Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rubiii
Created March 10, 2010 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rubiii/328263 to your computer and use it in GitHub Desktop.
Save rubiii/328263 to your computer and use it in GitHub Desktop.
SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://v1_0.validation.ws.chief.blau.de/">
<soapenv:Header/>
<soapenv:Body>
<v1:validateName>
<validationRequest>
<names>
<firstName>David</firstName>
<lastName>Hasselhoff</lastName>
</names>
</validationRequest>
</v1:validateName>
</soapenv:Body>
</soapenv:Envelope>
SOAP response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:validateNameResponse xmlns:ns2="http://v1_0.validation.ws.chief.blau.de/">
<return>
<names>
<firstName>David</firstName>
<lastName>Hasselhoff</lastName>
<valid>true</valid>
</names>
</return>
</ns2:validateNameResponse>
</soap:Body>
</soap:Envelope>
Savon:
client = Savon::Client.new "http://hindenburg:28080/chief/1.0/ValidationService?wsdl"
response = client.validate_name do |soap|
soap.body = { :validation_request => { :names => { :first_name => "David", :last_name => "Hasselhoff" } } }
end
response.to_hash
# => { :return => { :names => { :first_name => "David", :last_name => "Hasselhoff", :valid => true } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment