Java Reference
In-Depth Information
In this example, you'll use a WSDL that is defined by a third party, representing a real-world
web service. It is somewhat long and complicated (at least more so than some of our sim-
pler examples), and is written in ASP.NET and not Java. It defines complex objects for use in
SOAP headers. So it's a little more challenging to use, and doesn't let you get away with any
contrived toy code.
Beyond the fact that the header objects are composite objects and not merely strings, the
WSDL also defines its use of headers differently. In the previous username and password ex-
ample, the WSDL was generated by JAX-WS, which also conveniently can be used for the
consumer side. Let's take a look at how this works with a WSDL from StrikeIron.com that
defines headers as composite Java objects:
<wsdl:definitions xmlns:s1="http://ws.strikeiron.com"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:si="http://www.strikeiron.com"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://www.strikeiron.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
//...all types omitted for brevity
</wsdl:types>
<wsdl:message name="AddressToAddressDistanceSoapIn">
<wsdl:part name="parameters" element="si:AddressToAddressDistance"
/>
</wsdl:message>
<wsdl:message name="AddressToAddressDistanceSoapOut">
<wsdl:part name="parameters"
element="si:AddressToAddressDistanceResponse" />
</wsdl:message>
<wsdl:message name="AddressToAddressDistanceResponseInfo">
<wsdl:part name="ResponseInfo" element="si:ResponseInfo" />
</wsdl:message>
<wsdl:message name="GetRemainingHitsSoapIn">
<wsdl:part name="parameters" element="s1:GetRemainingHits" />
</wsdl:message>
<wsdl:message name="GetRemainingHitsSoapOut">
<wsdl:part name="parameters" element="s1:GetRemainingHitsResponse"
/>
</wsdl:message>
<wsdl:message name="LicenseInfoMessage">
Search WWH ::




Custom Search