WebSphere Message Service Clients: Web Services Client for C++, Version 1.1 作業系統: Linux, Windows

WSDD

這個一般 Web 服務部署描述子 (WSDD) 檔的範例 示範如何建構 WSDD 檔。

下列範例 WSDD 檔的前兩行必須保持與這裡顯示的內容相同, 它們會告知 WSDD 剖析器如何讀取檔案,並且可以為後續的區段提供重要的資訊。 在必要的標頭之後有兩個主要區段,一個用於服務處理常式, 另一個用於廣域處理常式。服務區段內的每一個項目都是針對 SOAP 動作特定的處理常式, 而且只有在使用該特定 Web 服務時才會呼叫它們。廣域區段中的每一個項目都是針對非 Web 服務特定的 處理常式,而且不論呼叫的 Web 服務方法為何,都會呼叫它們。

當您定義處理常式時, 請注意下列幾個重點:

一旦定義處理常式的類型之後,必須進一步將處理程式識別為要在要求訊息流程(亦即, 在 requestFlow 標示內)或回應訊息流程(亦即,在 responseFlow 標示內)中呼叫的處理常式,這樣才能達成下列目的:

在宣告處理常式關聯時,您必須為處理常式指定一個唯一名稱(例如, myClientHandlerReq)。如果要識別 AxisClient 可以找到處理常式程式庫的位置, 則 type 屬性值必須是完整的路徑。

一般的 WSDD

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:C="http://xml.apache.org/axis/wsdd/providers/c">

<!--服務處理常式定義-->
  <service name="ServiceHandler" provider="CPP:DOCUMENT"
description="Service Handlers">
    <requestFlow>
      <handler name="myClientHandlerReq"
type="<inst_dir>\wscc\samples\handlers\myClientHandler.dll">
      </handler>
    </requestFlow>
    <responseFlow>
      <handler name="myClientHandlerRes"
type="<inst_dir>\wscc\samples\handlers\myClientHandler.dll">
      </handler>
    </responseFlow>
  </service>

<!--廣域處理常式定義-->
  <globalConfiguration name="GlobalHandler" provider="CPP:DOCUMENT"
description="Global Handler">
    <requestFlow>
      <handler name="myGlobalHandlerReq"
type="<inst_dir>\wscc\samples\handlers\myGlobalHandler.dll">
      </handler>
    </requestFlow>
    <responseFlow>
      <handler name="myGlobalHandlerRes"
type="<inst_dir>\wscc\samples\handlers\myGlobalHandler.dll">
      </handler>
    </responseFlow>
  </globalConfiguration>
  </deployment>

Reference topic

使用條款 | 此頁的評等

「時間戳記」圖示前次更新: 28 Apr 2006
(C) Copyright IBM Corporation 2005. All Rights Reserved.
本資訊中心採用 Eclipse 技術。(http://www.eclipse.org)