外部Webサービスの構成
指定したエンドポイントURLでサードパーティWebサービスにアウトバウンド・メッセージを送信するようにオブジェクト・ワークフローを構成できます。 エンドポイントURLは、アプリケーションからデータを受信する外部Webサービスです。
サードパーティWebサービスは、Oracleで定義されたサービスWSDLに準拠している必要があります。
外部Webサービスを構築するには、OutboundMessageService.wsdlおよび.xsdファイルを使用します。 次に、オブジェクト・ワークフローのアウトバウンド・メッセージ・イベント・アクションを定義するときに、外部WebサービスのエンドポイントURLを指定します。
このトピックの内容は次のとおりです:
-
Webサービスの構成方法
-
OutboundMessageService.wsdlの例
-
OutboundMessageService.xsdの例
-
使用可能なセキュリティ・ポリシー
Webサービスの構成
Webサービスを構成するには、Webサービスの指示を使用して、OutboundMessageService.xsdファイル内のパラメータを置き換える必要があります。
Webサービスの詳細は、『SOAP Webサービス』ガイドを参照してください。
-
標準オブジェクトの場合は、オブジェクト名でガイドを検索します。
カスタム・オブジェクトの場合は、対応するアプリケーション内のすべてのカスタム・オブジェクト(Sales Custom Business Objectなど)の汎用Webサービスを検索します。
-
サービスで提供されている情報を使用して、ライブ環境URLから.xsdファイルを抽出します。
-
OutboundMessageService.xsdのパラメータを目的のオブジェクトの名前に置き換えます。
パラメータは、.xsdファイルでパラメータ$OBJECT_TARGET_NAMESPACE$および$OBJECT_NAME$としてマークされます。
OutboundMessageService.wsdlおよびOutboundMessageService.xsdの例は、参照用にここに示されています。
WSDLファイルの例
この項では、参照用のOutboundMessageService.wsdlの例を示します。
//Sample OutboundMessageService.wsdl
<wsdl:definitions
name="OutboundMessageService"
targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
xmlns:errors="http://xmlns.oracle.com/adf/svc/errors/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:types="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
>
<wsdl:import namespace="http://xmlns.oracle.com/adf/svc/errors/" location="ServiceException.wsdl"/>
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
schemaLocation="OutboundMessageService.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="OutboundMessageService_processOutboundMessage">
<wsdl:part name="parameters" element="types:processOutboundMessage"/>
</wsdl:message>
<wsdl:message name="OutboundMessageService_processOutboundMessageResponse">
<wsdl:part name="parameters" element="types:processOutboundMessageResponse"/>
</wsdl:message>
<wsdl:portType name="OutboundMessageService">
<wsdl:documentation/>
<wsdl:operation name="processOutboundMessage">
<wsdl:input message="tns:OutboundMessageService_processOutboundMessage"/>
<wsdl:output message="tns:OutboundMessageService_processOutboundMessageResponse"/>
<wsdl:fault name="ServiceException" message="errors:ServiceException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="OutboundMessageServiceSoapHttp" type="tns:OutboundMessageService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="processOutboundMessage">
<soap:operation soapAction="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/processOutboundMessage"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ServiceException">
<soap:fault name="ServiceException" use="literal" encodingStyle=""/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="OutboundMessageService">
<wsdl:port name="OutboundMessageServiceSoapHttpPort" binding="tns:OutboundMessageServiceSoapHttp">
<soap:address location="http://adc2111013:7101/OMInterface/OutboundMessageService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
XSDファイルの例
この項では、参照用のOutboundMessageService.xsdの例を示します。 パラメータは、.xsdファイルでパラメータ$OBJECT_TARGET_NAMESPACE$および$OBJECT_NAME$としてマークされます。
//Sample: OutboundMessageService.xsd
<schema elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
xmlns:ns0="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns1="$OBJECT_TARGET_NAMESPACE$"
xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/" xmlns:tns="http://xmlns.oracle.com/apps/crmCommon/content/outboundMessage/types/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/adf/svc/types/" schemaLocation="BC4JService.xsd"/>
<import namespace="$OBJECT_TARGET_NAMESPACE$" schemaLocation="$OBJECT_NAME$.xsd"/>
<import namespace="http://xmlns.oracle.com/adf/svc/errors/" schemaLocation="ServiceException.xsd"/>
<element name="processOutboundMessage">
<complexType>
<sequence>
<element name="object" type="ns1:$OBJECT_NAME$"/>
</sequence>
</complexType>
</element>
<element name="processOutboundMessageResponse">
<complexType>
<sequence/>
</complexType>
</element>
</schema>
セキュリティ・ポリシー
アウトバウンド・メッセージでは、認証のみのクライアント側セキュリティ・ポリシーまたは転送中にメッセージを保護するトランスポート・レベルのセキュリティ・ポリシーを使用できます。 オブジェクト・ワークフローのアウトバウンド・メッセージで使用されるデフォルトの認証のみのポリシーは、oracle/wss10_saml_token_client_policy
です。 このポリシーには、アウトバウンドSimple Object Access Protocol (SOAP)リクエスト・メッセージのSecurity Assertion Markup Language (SAML)トークンが含まれます。 このポリシーは、セキュア・ネットワーク・セグメント内にターゲットwebサービスがある場合にのみ使用してください。
対応するサービスでは、oracle/wss10_saml_token_service_policy
やoracle/wss_saml_or_username_token_service
などの互換性のあるサービス・ポリシーを使用できます。
サービスがファイアウォールの外側にある場合は、作成アクションで「メッセージの保護」オプションを選択して、メッセージを保護する必要があります: アウトバウンド・メッセージpage. 保護されている場合、アウトバウンド・メッセージは、デフォルトで有効になっている一方向セキュア・ソケット・レイヤー(SSL)でoracle/wss_username_token_over_ssl_client_policy
を使用します。 対応するサービスでは、oracle/wss_username_token_over_ssl_service_policy
などの互換性のあるサービス・ポリシーを使用する必要があります。