WSIF サービスが SOAP over JMS サービスにアクセスできるようにする WSDL 拡張の作成

Web サービス記述言語 (WSDL) 拡張を作成して、WSIF (Web Services Invocation Framework) サービスが、 トランスポート・メカニズムとして JMS (Java™ Message Service) を使用する SOAP サービスにアクセスできるようにします。

始める前に

このトピックでは、WebSphere® Application Server のインストール時に、JMS プロバイダー (デフォルトのメッセージング・プロバイダー、または WebSphere MQ メッセージング・プロバイダーなどの他のプロバイダーのいずれか) が選択され、構成されていることを前提としています。 まだ実行されていない場合は、メッセージング・プロバイダーの選択の説明に従ってここで実行してください。

このタスクについて

SOAP メッセージに XML しか含まれていない場合は、Java Message Service (JMS) メッセージの 本文タイプ TextMessage を使用して JMS トランスポート・メカニズム上で送信できます。 SOAP メッセージは、SOAP エンベロープも含めて、JMS メッセージでラップされ、適切なキューに配置されます。 コンテナーは、JMS メッセージを受信すると、SOAP メッセージを除去してクライアントに送信します。

以下の手順とそれに関連したコード・フラグメントを 使用すると、Web サービス記述言語 (WSDL) 拡張を作成して、WSIF サービスが SOAP over JMS サービスに アクセスできるようにすることができます。

注: SOAP over JMS バインディングは SOAP over HTTP バインディングとほとんど同じであるため、 この手順を、SOAP over HTTP の WSDL バインディング拡張を作成する際の ガイドとして使用することもできます。

手順

SOAP over JMS バインディングを定義する WSDL の例

<!-- Example: SOAP over JMS Text Message -->

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
        	      name="StockQuoteInterfaceDefinitions"
        targetNamespace="urn:StockQuoteInterface"
        xmlns:tns="urn:StockQuoteInterface"
        xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:message name="GetQuoteInput">
        <part name="symbol" type="xsd:string"/>
    </wsdl:message>
    <wsdl:message name="GetQuoteOutput">
        <part name="value" type="xsd:float"/>
    </wsdl:message>

    <wsdl:portType name="StockQuoteInterface">
        <wsdl:operation name="GetQuote">
            <wsdl:input message="tns:GetQuoteInput"/>
            <wsdl:output message="tns:GetQuoteOutput"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="StockQuoteSoapJMSBinding" type="tns:StockQuoteInterface">
        <soap:binding style="rpc"
                 transport="http://schemas.xmlsoap.org/soap/jms"/>
        <wsdl:operation name="GetQuote">
            <soap:operation soapAction="urn:StockQuoteInterface#GetQuote"/>
            <wsdl:input>
                <soap:body use="encoded" namespace="urn:StockQuoteService"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="encoded" namespace="urn:StockQuoteService"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="StockQuoteService">
        <wsdl:port name="StockQuoteServicePort" 
                      binding="sqi:StockQuoteSoapJMSBinding">
            <jms:address destinationStyle="queue"
                     jndiConnectionFactoryName="myQCF"
                     jndiDestinationName="myQ"
                     initialContextFactory= "com.ibm.NamingFactory"
                     jndiProviderURL="iiop://something:900/">

                     <jms:propertyValue name="targetService"
                                        type="xsd:string"
                                        value="StockQuoteServicePort"/>

            </jms:address>

        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twsf_prsjwe
ファイル名:twsf_prsjwe.html