Java Reference
In-Depth Information
This is the SOAP message you're sending as the request:
---[HTTP request]---
SOAPAction: "http://www.strikeiron.com/AddressToAddressDistance"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg,
*; q=.2, */*; q=.2
Content-Type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<LicenseInfo xmlns="http://ws.strikeiron.com">
<RegisteredUser>
<UserID>eben@example.com</UserID>
<Password>secret</Password>
</RegisteredUser>
</LicenseInfo>
</S:Header>
<S:Body>
<ns2:AddressToAddressDistance xmlns="http://ws.strikeiron.com"
xmlns:ns2="http://www.strikeiron.com">
<ns2:Location1>
<ns2:address1>10 Columbus Circle</ns2:address1>
<ns2:city_state_zip>New York,NY,10019</ns2:city_state_zip>
<ns2:country>US</ns2:country></ns2:Location1>
<ns2:Location2><ns2:address1>301 Park Avenue</ns2:address1>
<ns2:city_state_zip>New York,NY,10022</ns2:city_state_zip>
<ns2:country>US</ns2:country>
</ns2:Location2>
<ns2:UnitOfMeasure>Miles</ns2:UnitOfMeasure>
</ns2:AddressToAddressDistance>
</S:Body>
</S:Envelope>
The headers appear in the envelope as you would hope, using a composite service-defined ob-
ject, rather than merely a built-in schema type.
This is the output resulting from successfully invoking the service to calculate the distance
between the Waldorf Hotel on Park Avenue and Thomas Keller's Per Se restaurant on Colum-
bus Circle, both in New York City:
---[HTTP response 200]---
null: HTTP/1.1 200 OK
Cache-control: private
Content-type: text/xml; charset=utf-8
Content-length: 1009
X-powered-by: ASP.NET
Search WWH ::




Custom Search