WSDL

 


Web Services Description Language (WSDL) is an XML-based specification used to describe a Web service. A WSDL document describes the methods provided by a Web service, the input and output parameters, and how to connect to it.

Developers of WebLogic Web Services do not need to create the WSDL files. These files can be generated automatically as part of the WebLogic Web Services development process.

The following example, for informational purposes only, shows a WSDL file that describes the stock trading Web service StockQuoteService that contains the method GetLastStockQuote:

<?xml version="1.0"?>
  <definitions name="StockQuote"
         targetNamespace="http://sample.com/stockquote.wsdl"
         xmlns:tns="http://sample.com/stockquote.wsdl"
         xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
         xmlns:xsd1="http://sample.com/stockquote.xsd"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns="http://schemas.xmlsoap.org/wsdl/">
    <message name="GetStockPriceInput">
      <part name="symbol" element="xsd:string"/>
    </message>
    <message name="GetStockPriceOutput">
      <part name="result" type="xsd:float"/>
    </message>
    <portType name="StockQuotePortType">
      <operation name="GetLastStockQuote">
       <input message="tns:GetStockPriceInput"/>
       <output message="tns:GetStockPriceOutput"/>
      </operation>
    </portType>
    <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
      <soap:binding style="rpc" 
            transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="GetLastStockQuote">
       <soap:operation soapAction="http://sample.com/GetLastStockQuote"/>
       <input>
         <soap:body use="encoded" namespace="http://sample.com/stockquote"
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
       </input>
       <output>
       <soap:body use="encoded" namespace="http://sample.com/stockquote"
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
       </output>
      </operation>>
    </binding>
    <service name="StockQuoteService">
      <documentation>My first service</documentation>
      <port name="StockQuotePort" binding="tns:StockQuoteSoapBinding">
       <soap:address location="http://sample.com/stockquote"/>
      </port>
    </service>
  </definitions>  


 

Home