Main Page

XMethods

?
The port name (
port_name
)
?
The location of the service (
webservice_url
)
To understand how to find this information, it’s best to look at a real WSDL file.
The Temperature Service is a Web service provided by XMethods (
http://www.xmethods.net
), a pub-
lic Web service publisher as well as a directory of publicly accessible Web services. This service accepts a
five-digit U.S. zip code and then returns the current temperature for that area. The WSDL file for the
Temperature Service looks like this:
<definitions name=”TemperatureService”
targetNamespace=”http://www.xmethods.net/sd/TemperatureService.wsdl”
xmlns:tns=”http://www.xmethods.net/sd/TemperatureService.wsdl”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/”
xmlns=”http://schemas.xmlsoap.org/wsdl/”>
<message name=”getTempRequest”>
<part name=”zipcode” type=”xsd:string” />
</message>
<message name=”getTempResponse”>
<part name=”return” type=”xsd:float” />
</message>
<portType name=”TemperaturePortType”>
<operation name=”getTemp”>
<input message=”tns:getTempRequest” />
<output message=”tns:getTempResponse” />
</operation>
</portType>
<binding name=”TemperatureBinding” type=”tns:TemperaturePortType”>
<soap:binding style=”rpc” transport=”http://schemas.xmlsoap.org/soap/http”
/>
<operation name=”
getTemp
”>
<soap:operation
soapAction=””
/>
<input>
<soap:body use=”encoded” namespace=”
urn:xmethods-Temperature
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” />
</input>
<output>
<soap:body use=”encoded” namespace=”
urn:xmethods-Temperature
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” />
</output>
</operation>
</binding>
<service name=”TemperatureService”>
<documentation>Returns current temperature in a given U.S.
zipcode</documentation>
<port name=”TemperaturePort” binding=”tns:TemperatureBinding”>
<soap:address
location=”http://services.xmethods.net:80/soap/servlet/rpcrouter” />
</port>
</service>
</definitions>
512
Chapter 17
20_579088 ch17.qxd 3/28/05 11:42 AM Page 512


JavaScript EditorFree JavaScript Editor     Ajax Editor


©