HomeDigital EditionSys-Con RadioSearch Web Services Cd
B2B Beginning WS Business Process Management Case Studies Content Management Distributing Computing e-Business Electronic Data Interchange Enterprise Industry Insight Integration Interviews Java & Web Services .NET Portal Product Reviews Scalability & Performance Security SOAP Source Code UDDI Wireless WS Standards WS Tips & Techniques WSDL WS Editorials XML

Why WSDL Is Not Yet Another Object IDL by Dr. Savas Parastatidis & Dr. Jim Webber
WSJ Vol 04 Issue 04 - pg.23



Listing 1: WSDL 2.0 element names and the alternatives that were discussed

<wsdl:interface ...>
  <wsdl:operation ...>
     ...
  </wsdl:operation>
</wsdl:interface>	
<wsdl:interactions ...>
  <wsdl:exchange ...>
    ...
  </wsdl:exchange>
</wsdl:interactions>

Listing 2: Library and Book IDL documents

interface Library
{
   Book   borrowBook(in string isbn);
}

interface Book
{
   string getISBN();
   string getAuthor();
}

Listing 3: Library service WSDL

<wsdl:types>
  <xsd:element name="isbnMsg" type="xsd:string"/>
  <xsd:element name="bookMsg">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="isbn" type="xsd:string"/>
        <xsd:element name="author" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</wsdl:types>

<wsdl:interface name="LibraryInterface">
  <wsdl:operation name="borrowBook">
    <wsdl:input message="isbnMsg"/>
    <wsdl:output message="bookMsg"/>
  </wsdl:operation>
</wsdl:interface>

Listing 4: Evolution of the Library and Book IDL documents

interface Library
{
   Book   borrowBook(in string isbn);
}

interface Book
{
   string getISBN();
   string getAuthor();
   string getTitle();
}

Listing 5: Evolution of the Library service WSDL

<wsdl:types>
  <xsd:element name="isbnMsg" type="xsd:string"/>

  <xsd:element name="bookMsg">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="isbn" type="xsd:string"/>
        <xsd:element name="author" type="xsd:string"/>
        <xsd:element name="title" type="xsd:string" minOccurs="0"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</wsdl:types>

<wsdl:interface name="LibraryInterface">
  <wsdl:operation name="borrowBook">
    <wsdl:input message="isbnMsg"/>
    <wsdl:output message="bookMsg"/>
  </wsdl:operation>
</wsdl:interface>