-
-
Save veekram/009b04eaa1f19550cf5181cb58974c7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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