Main Page


The SOAP message itself is contained inside an
, which is used to transfer the Web service call to
and from the server. A typical SOAP message looks like this:
<soap:Envelope xmlns:n=”custom namespace goes here”
<soap:Body soap:encodingStyle=””>
<!-- method-specific XML goes here -->
In the case of the client sending the message, the XML in
includes a method to call and
parameters. When the server sends the message,
includes the result(s) of the call. The
result can be a single value or a complex data type with multiple values.
Naturally, it is important that the client sends the SOAP message in the correct format, but how does a
developer know how to format the message? This is where WSDL comes in.
Web Services Description Language (WSDL, pronounced wizdel) is used to describe the capabilities, for-
mat, and other important information about Web services. WSDL files define the various operations a
Web service provides.
are specific remote functions that can be called for a given service (a Web
service can have one or more operations). It helps to think of a Web service as an object with one or more
methods; the object itself represents the service whereas the operations are considered the methods.
The basic sections of a WSDL file are the following:
Types — Defines the types used for the Web service calls. These types are based on XML
Schema data types and can represent simple types — such as numbers or strings — or complex
types, similar to objects that have properties.
Messages — Defines the input arguments and the output value for a given operation. Each
operation gets two message definitions, one for the operation request and one for the response.
Port Type — Defines the operations that are available from the Web service.
Bindings — Defines the format of the messages sent and received with each operation.
Service — Defines how to access the Web service operations.
A standard WSDL file has the following format:
<definitions name=”name_of_service”
Chapter 17
20_579088 ch17.qxd 3/28/05 11:42 AM Page 510

JavaScript EditorFree JavaScript Editor     Ajax Editor