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

在 WSDL 檔中定義的 SOAP 錯誤

請使用這個包含錯誤訊息的一般 WSDL 範例,來找出在 SOAP 錯誤在 WSDL 檔中的定義方式。

下面這個一般 WSDL 檔範例包含一個稱為 “MathOps” 的埠類型。有一個作業稱為“div”,其中有三個可能的錯誤訊息, 分別稱為“DivByZeroStruct”、“SpecialDetailStruct”和“OutOfBoundStruct”。

<wsdl:portType name="MathOps">
 <wsdl:operation name="div">
  <wsdl:input message="impl:divRequest" name="divRequest"/>
  <wsdl:output message="impl:divResponse" name="divResponse"/>
  <wsdl:fault message="impl:DivByZeroStruct" name="DivByZeroStruct"/>
  <wsdl:fault message="impl:SpecialDetailStruct" name="SpecialDetailStruct"/>
  <wsdl:fault message="impl:OutOfBoundStruct" name="OutOfBoundStruct"/>
 </wsdl:operation>
</wsdl:portType>

WSDL 先前已說明這些訊息結構的定義,其定義如下:

<complexType name="OutOfBoundStruct">
 <sequence>
  <element name="varString" nillable="true" type="xsd:string"/>
  <element name="varInt" type="xsd:int"/>
  <element name="specialDetail" nillable="true" type="impl:SpecialDetailStruct"/>
 </sequence>
		</complexType>
<complexType name="SpecialDetailStruct">
 <sequence>
  <element name="varString" nillable="true" type="xsd:string"/>
 </sequence>
		</complexType>
<element name="OutOfBoundStruct" nillable="true" type="impl:OutOfBoundStruct"/>
<complexType name="DivByZeroStruct">
 <sequence>
  <element name="varString" nillable="true" type="xsd:string"/>
  <element name="varInt" type="xsd:int"/>
  <element name="varFloat" type="xsd:float"/>
 </sequence>
		</complexType>

Reference topic

使用條款 | 此頁的評等

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