|
What Is It ?
|
WSDL is an XML-based language for defining the services offered by a web-service and how they are accesed. It stands for Web Service Description Language and is a standard formally specified by the W3C. The WSDL defines services as collections of network endpoints, or ports. The abstract definition of ports and messages is separated from their concrete use or instance, allowing the re-use of these definitions. A common transport for web-services is the SOAP/HTTP protocol (and this is mandated by the WS-I BP v1.0). |
| Sections of a WSDL definition |
|
| <definitions> | Top-level element |
| <types> | Definitions of data-types (<xsd:schema> by default ) |
| <message> | Definition of a single message, in terms of zero or more "parts" |
| <portType> | Definition of a web-service "port" in terms of operations, and the input/output/fault message(s) used to fulfil them |
| <binding> | Definition of the style/encoding and protocol (e.g. SOAP) of a "port" and the binding for each operation |
| <service> | Definition of a service |
| WSDL Structure | |
| wsdl:import | Can be used to import WSDL from another file. Must precede all other elements (except wsdl:documentation if used) |
| xsd:import | Can be used to import a schema into a wsdl:types element |
| SOAP Binding Style/Encoding |
|
| rpc-literal | SOAP messages indicate operation name, but can't be directly validated against a schema |
| rpc-encoded | As above and type definition is included in message (not WS-I compliant) |
| document-literal | SOAP messages do no indicate operation name, but can be directly validated against a schema |
| document-encoded | Not used and not WS-I compliant |
| doc-lit wrapped | Wrapper message indicates operation name, and can be directly validated against a schemal. Recommended approach, but results in verbose WSDL, can't have overloaded operations. |
| Exchange Types | |
| one-way | RX input only |
| request-response | RX input, TX output |
| solicit-response | TX output, RX input (not supported by WS-I BP) |
| notification | TX output only (not supported by WS-I BP) |
| Information Models | |
| RPC style | Suited to: process oriented services, with synchronous/conversational exchanges Disadvantages: strongly couple, synchronous |
| Doc style | Suited to: data oriented services, with asynchronous exchanges (no immediate response) Disadvantaes: no standard identification mechanism, bigger XML serialisation overhead ? |
© 2007 i-Lab Limited