Web Services Description Language
WSDL (Web Services Description Language) ist ein Standard für XML-Dokumente, die Webservices beschreiben.
Ein WSDL-Dokument beschreibt Services. Services enthalten Netzwerkendpunkte, die sogenannten Ports. Ein Port besteht aus einem Binding für einen Port-Type. Das Binding legt die Nachrichtenformate fest. Ein Port-Type besteht aus einer oder mehreren Operationen. Die Operation beschreiben die Aktionen, die der Service ausführen kann.
Ein einfaches WSDL Dokument sieht so aus:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:tns="... Namespace ..."
name="... Schema ..."
targetNamespace="... Namespace ...">
<types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="... Namespace ..."
elementFormDefault="qualified">
<element name="Request" type="tns:RequestType"/>
<complexType name="RequestType">
<sequence>
<element
name="... Elementname ..."
type="... Elementtyp ..."
[nillable="true"]/>
...
</sequence>
</complexType>
<element name="Response" type="tns:ResponseType"/>
<complexType name="ResponseType">
<sequence>
...
</sequence>
</complexType>
</schema>
</types>
<message name="RequestMessage">
<part name="parameters" element="tns:Request"/>
</message>
<message name="ResponseMessage">
<part name="parameters" element="tns:Response"/>
</message>
<portType name="... Porttype ...">
<operation name="... Operation ...">
<input message="tns:RequestMessage"/>
<output message="tns:ResponseMessage"/>
</operation>
...
</portType>
<binding name="... Binding ..." type="... tns:Porttype ...">
<wsaw:UsingAddressing wsdl:required="true" />
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="... Operation ...">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="... Service ...">
<port name="... Port ..." binding="... tns:Binding ...">
<soap:address location="... URI ..."/>
</port>
</service>
</definitions>
Ein WSDL-Dokument beschreibt Services. Services enthalten Netzwerkendpunkte, die sogenannten Ports. Ein Port besteht aus einem Binding für einen Port-Type. Das Binding legt die Nachrichtenformate fest. Ein Port-Type besteht aus einer oder mehreren Operationen. Die Operation beschreiben die Aktionen, die der Service ausführen kann.
Ein einfaches WSDL Dokument sieht so aus:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:tns="... Namespace ..."
name="... Schema ..."
targetNamespace="... Namespace ...">
<types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="... Namespace ..."
elementFormDefault="qualified">
<element name="Request" type="tns:RequestType"/>
<complexType name="RequestType">
<sequence>
<element
name="... Elementname ..."
type="... Elementtyp ..."
[nillable="true"]/>
...
</sequence>
</complexType>
<element name="Response" type="tns:ResponseType"/>
<complexType name="ResponseType">
<sequence>
...
</sequence>
</complexType>
</schema>
</types>
<message name="RequestMessage">
<part name="parameters" element="tns:Request"/>
</message>
<message name="ResponseMessage">
<part name="parameters" element="tns:Response"/>
</message>
<portType name="... Porttype ...">
<operation name="... Operation ...">
<input message="tns:RequestMessage"/>
<output message="tns:ResponseMessage"/>
</operation>
...
</portType>
<binding name="... Binding ..." type="... tns:Porttype ...">
<wsaw:UsingAddressing wsdl:required="true" />
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="... Operation ...">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="... Service ...">
<port name="... Port ..." binding="... tns:Binding ...">
<soap:address location="... URI ..."/>
</port>
</service>
</definitions>