Main Page

WSDL files

xmlns=”http://schemas.xmlsoap.org/wsdl/”>
<types>
<!-- custom types defined here -->
</types>
<message name=”request_name”>
<!-- parameters -->
</message>
<message name=”response_name”>
<!-- return value(s) -->
</message>
<portType name=”porttype_name”>
<operation name=”method_name”>
<input message=”tns:request_name” />
<output message=”tns:response_name” />
</operation>
</portType>
<binding name=”binding_name” type=”tns:porttype_name”>
<soap:binding style=”rpc” transport=”http://schemas.xmlsoap.org/soap/http”
/>
<operation name=”method_name”>
<soap:operation soapAction=”soap_action” />
<input>
<soap:body use=”encoded” namespace=”urn_string”
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” />
</input>
<output>
<soap:body use=”encoded” namespace=”urn_string”
encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” />
</output>
</operation>
</binding>
<service name=”service_name”>
<documentation><!-- description of service --></documentation>
<port name=”port_name” binding=”tns:binding_name”>
<soap:address location=”webservice_url” />
</port>
</service>
</definitions>
As you can tell, WSDL files can be very complex and actually aren’t intended for the human eye. The
intended use of these files is to provide programs (and their components) with enough information to
call the Web service operations on their own. With most Web service toolkits, you never have to write a
WSDL file; it is automatically generated for you.
Sometimes, however, you must locate certain pieces of information within a WSDL file in order to access
a Web service (depending on the type of development you are doing). The important pieces of informa-
tion in a WSDL file are the following:
?
The name of the method you want to call (
method_name
)
?
The SOAP action (
soap_action
)
?
The target namespace for the input of the method you want call (
urn_string
)
511
Web Services
20_579088 ch17.qxd 3/28/05 11:42 AM Page 511


JavaScript EditorFree JavaScript Editor     Ajax Editor


©