WSDL 連結

WSDL 連結文件可定義特定 portType 所定義之作業和訊息的通訊協定詳細資料。WSDL 連結文件相當於發佈至 UDDI 登錄的 tModel 或服務介面。您可以產生其中包含所有 WSDL 元素的整體 WSDL 文件,也可以產生個別 WSDL 連結文件。

WSDL 連結文件是特定埠類型的具體通訊協定和資料格式規格。連結資訊含有通訊協定名稱、呼叫樣式、服務 ID 及每項作業的編碼。

下列 WSDL 連結文件範例是依據 StockQuoteService 範例。

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="StockQuoteServiceBinding"
targetNamespace="http:///"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http:///">
    <import location="StockQuoteService.wsdl"
namespace="http:///"/>
  <!--   The mapping to the actual transport protocol names is  
   -->
  <!--   performed in the binding, the next part of the service 
   -->
  <!--   interface file.  StockQuoteServiceSOAPBinding is the SOAP  
   -->
  <!--   binding for the port type.  The binding describes      
   -->
  <!--   which run-time protocol is supported by the service    
   -->
  <!--   provider and contains protocol configuration
information.  -->
   <wsdl:binding name="StockQuoteServiceSoapBinding" type="intf:StockQuoteService">

      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="getQuote">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getQuoteRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="getQuoteResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>
使用條款 | 讀者意見
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.