My Oracle Support Banner

WebLogic Server サポート パターン カスタム障害またはユーザ定義の例外を使用する場合の問題 の調査 (Doc ID 1986177.1)

Last updated on AUGUST 13, 2020

適用範囲:

Oracle WebLogic Server - バージョン 6.1 から 8.1
この文書の内容はすべてのプラットフォームに適用されます。

目的

問題の説明

次のように、WSDL に wsdl:fault が含まれ、complexType を参照している場合があります。

<types xmlns:tns="http://www.bea.com/servers/wls70/samples/examples/webservices/basic/javaclass" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
.....
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:examples.webservices.basic.javaclass" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="java:examples.webservices.basic.javaclass">
  <xsd:element type="stns:MyException" name="MyException">
  </xsd:element>
  <xsd:complexType name="MyException">
    <xsd:sequence>
      <xsd:element type="xsd:int" name="errorId" minOccurs="1" maxOccurs="1">
      </xsd:element>
      <xsd:element type="xsd:string" name="errorMessage" minOccurs="1" nillable="true" maxOccurs="1">
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>
.....
<message name="MyException">
  <part xmlns:partns="java:examples.webservices.basic.javaclass" type="partns:MyException" name="MyException">
  </part>
</message>
.....
<portType name="HelloWorldPort">
  <operation name="sendSOAPFault">
    <input message="tns:sendSOAPFault">
    </input>
    <output message="tns:sendSOAPFaultResponse">
    </output>
    <fault name="MyException" message="tns:MyException">
    </fault>
  </operation>
</portType>

この WSDL から Web サービスを生成すると、次の動作が確認されることがあります。

逆に、ユーザ定義の例外をスローする Java アプリケーションで Web サービスを生成する場合にも、これに似た問題が発生します。

問題のトラブルシューティング

注: 次に示す項目は、必ずしもすべて実行する必要はありません。問題によっては、いくつかの項目を実行するだけで解決するものもあります。

トラブルシューティングの手順

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


本書の内容
目的
 問題の説明
 問題のトラブルシューティング
トラブルシューティングの手順
 問題の説明
 問題のトラブルシューティング
 問題の原因
 SOAPFaultException の処理
 サービスの実装
 クライアントの実装
 サービス固有の例外の処理
 サービスの実装
 クライアントの実装
 sendSOAPFault() を呼び出す SOAP リクエスト/応答メッセージ
 スタブ ベースのクライアントを使用した場合
 Dynamic Invocation Interface (DII) クライアントを使用した場合
 トラブルシューティングのヒント
 weblogic.webservice.verbose=true の使用
 weblogic.webservice.tools.debug.Post ユーティリティの使用
参照情報

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.