Talk:Web Services Description Language

From Wikipedia, the free encyclopedia

Contents

[edit] Pronunciation

For my part, I've never heard WSDL pronounced "weasel", which sounds somewhat pejorative to me. User 87.248.128.17 claims "I've heard this used as a reference to WSDL many times." This may well be true, but would probably fall foul of Wikipedia's policy on original research. --RichardVeryard 14:22, 2 August 2006 (UTC)

I have also never heard WSDL pronounced "weasel," nor have any of my co-workers, and we work with WSDLs on a regular basis (internally and with customers). While a very small group of people may pronounce it as "weasel," it is in no way a common pronunciation. --Etev 18:12, 10 August 2006 (UTC)

Definitely pronounced "wiz-dəl". 198.22.123.107 21:07, 29 August 2006 (UTC)

If it helps any, I have always heard it pronounced "wooz-dools" here in Chicago. 71.239.175.188 14:34, 24 May 2007 (UTC)



The WSDL example is nothing like a real-world example, showing only how to do REST over SOAP, and not even a functional RESTful service. No web service of any kind would ever implement an interface like this. I move that it get replaced by the WSDL from an actual existing service. 67.98.226.13 16:50, 21 September 2007 (UTC)



The WSDL Example is conceptual and explain the philosophy behind WSDL: to describe interfaces. Real World examples I've seen, tend to show only the practical aspects of configuring WS engines for SOAP...

By my opinion, WSDL is modeling language for interfaces, like UML is a modeling language for classes, data flow, state chart, etc. in OOP.

I really don't understand the meaning of the "adobe flex" example... maybe would be more intresting to show something from the JAX-WS...



BTW, I have 3 file that I'm using in my thesis for describing this technology.

Here they are, maybe you could think they are a better examples for WSDL.

[edit] XML Schema for the samples

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://example.org/types" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      targetNamespace="http://example.org/types"  
      elementFormDefault="qualified">
 
   <xsd:complexType name="metaType" mixed="true">
      <xsd:sequence>
         <xsd:any minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      <xsd:attribute name="name" type="xsd:string" use="required"/>
   </xsd:complexType>
 
   <xsd:complexType name="dataType" mixed="true">
      <xsd:sequence>
         <xsd:any  minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
   </xsd:complexType>
 
   <xsd:element name="getInElem">
      <xsd:complexType>
         <xsd:attribute name="id" type="xsd:integer" use="required"/>
      </xsd:complexType>
   </xsd:element>
 
   <xsd:element name="setInElem">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="meta" type="metaType" 
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="data" type="dataType"/>
         </xsd:sequence>
         <xsd:attribute name="id" type="xsd:integer" use="required"/>
      </xsd:complexType>
   </xsd:element>
 
   <xsd:element name="getOutElem">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="meta" type="metaType" 
                         minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="data" type="dataType"/>
         </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
 
   <xsd:element name="setOutElem"/>
 
   <xsd:element name="errorElem"/>
 
</xsd:schema>

[edit] WSDL 1.1 Sample, with SOAP binding

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
      xmlns:wt="http://example.org/types" 
      xmlns:w11="http://example.org/wsdl11" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
      targetNamespace="http://example.org/wsdl11">
 
   <types>
      <xsd:schema>
         <xsd:import namespace="http://example.org/types" 
                     schemaLocation="mySchema.xsd" />
      </xsd:schema>
   </types>
 
   <message name="GetInMsg">   
      <part name="input" element="wt:getInElem"/>
   </message>
   <message name="GetOutMsg">
      <part name="output" element="wt:getOutElem"/>
   </message>
   <message name="SetInMsg">
      <part name="input" element="wt:setInElem"/>
   </message>
   <message name="SetOutMsg">
      <part name="output" element="wt:setOutElem"/>
   </message>
   <message name="ErrorMsg">
      <part name="fault" element="wt:errorElem"/>
   </message>
 
   <portType name="MyInterface">
      <operation name="Get">
         <input message="w11:GetInMsg"/>
         <output message="w11:GetOutMsg"/>
         <fault name="GetError" message="w11:ErrorMsg"/>
      </operation>
      <operation name="Set">
         <input message="w11:SetInMsg"/>
         <output message="w11:SetOutMsg"/>
         <fault name="SetError" message="w11:ErrorMsg"/>
      </operation>
   </portType>
 
   <binding name="MySoapBinding" type="w11:MyInterface">
      <soap:binding style="document" 
               transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="Get">
         <soap:operation soapAction="get"/>
         <input>
            <soap:body use="literal"/>
         </input>
         <output>
            <soap:body use="literal"/>
         </output>
         <fault name="GetError"/>
      </operation>
      <operation name="Set">
         <soap:operation soapAction="set"/>
         <input>
            <soap:body use="literal"/>
         </input>
         <output>
            <soap:body use="literal"/>
         </output>
         <fault name="SetError"/>
      </operation>
   </binding>
 
   <service name="MyService">
      <port name="SoapBinding" binding="w11:MySoapBinding">
         <soap:address location="http://example.org/myService/soap"/>
      </port>
   </service>
</definitions>

[edit] WSDL 2.0 Sample, with HTTP and SOAP binding

<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://www.w3.org/ns/wsdl" 
       xmlns:wt="http://example.org/types"
       xmlns:w20="http://example.org/wsdl20"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
       xmlns:whttp="http://www.w3.org/ns/wsdl/http"
       targetNamespace="http://example.org/wsdl20">
 
   <types>
      <xsd:schema>
         <xsd:import namespace="http://example.org/types" 
                     schemaLocation="mySchema.xsd"/>
      </xsd:schema>
   </types>
 
   <interface name="MyInterface">
      <fault name="Error" element="wt:errorElem"/>
      <operation name="Get" 
            pattern="http://www.w3.org/ns/wsdl/in-out">
         <input element="wt:getInElem"/>
         <output element="wt:getOutElem"/>
         <outfault ref="w20:Error"/>
      </operation>
      <operation name="Set" 
             pattern="http://www.w3.org/ns/wsdl/in-out">
         <input element="wt:setInElem"/>
         <output element="wt:setOutElem"/>
         <outfault ref="w20:Error"/>
      </operation>
   </interface>
 
   <binding name="MySoapBinding"
         interface="w20:MyInterface"
         type="http://www.w3.org/ns/wsdl/soap"
         wsoap:version="1.1"
         wsoap:protocol="http://www.w3.org/2006/01/soap11/bindings/HTTP/">
      <fault ref="w20:Error"/>
      <operation ref="w20:Get" wsoap:soapAction="get"/>
      <operation ref="w20:Set" wsoap:soapAction="set"/>
   </binding>
 
   <binding name="MyHttpBinding"
         interface="w20:MyInterface"
         type="http://www.w3.org/ns/wsdl/http">
      <fault ref="w20:Error"
            whttp:code="500 Internal Server Error"/>
      <operation ref="w20:Get" whttp:method="GET"
            whttp:location="{wt:id}">
      <operation ref="w20:Set" whttp:method="POST"
            whttp:location="{wt:id}"
            whttp:inputSerialization="application/x-www-form-urlencoded"/>
   </binding>
 
   <service name="MyService" interface="w20:MyInterface">
      <endpoint name="SoapBinding" binding="w20:MySoapBinding" 
                 address="http://example.org/myService/soap"/>
      <endpoint name="HttpBinding" binding="w20:MyHttpBinding" 
                 address="http://example.org/myService/http"/>
   </service>
</description>

ps. I'm unsure of the correctness of the lines containing whttp:location="{wt:id}"

bye, 'Cristiano, Italy' (i will register a day... )

[edit] Q & A

Ask a question about this topic and wait for answer —Preceding unsigned comment added by 213.178.224.165 (talk) 18:55, 23 February 2008 (UTC)