WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

The SOAP over JMS provider - Writing the WSDL extension

Why and when to perform this task

If a SOAP message contains only XML, then it can be carried on the Java Message Service (JMS) transport with the JMS message body type TextMessage.

The WSDL binding extension for SOAP over JMS varies only slightly from the SOAP over HTTP binding.

Steps for this task (dependent on configuration)

Example

Here is an example of a WSDL that defines a SOAP over JMS binding:

<!-- 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>

What to do next

Setting the JMS address (alternative method).

For the SOAP over JMS provider you can instead specify the JMS address using the <soap:address> tag in the following format:
jms:/[queue|topic]?<property>=<value>&amp;<property>=<value>&amp;...
Where the specification of queue or topic corresponds to the JMS address destinationStyle attribute.

The following table lists the valid properties for use with the <soap:address> tag:

Property name Property description Corresponding JMS address value
destination The JNDI name of the destination queue or topic jndiDestinationName
connectionFactory The JNDI name of the connection factory. jndiConnectionFactory
targetService The name of the port component of the target service targetService jms:propertyValue within jms:address
JNDI-related properties (optional):
initialContextFactory The name of the initial context factory. initialContextFactory
jndiProviderURL The JNDI provider URL jndiProviderURL
JMS-related properties (optional):
deliveryMode An indication as to whether the request message should be persistent or not. The valid values are DeliveryMode.NON_PERSISTENT (default) and DeliveryMode.PERSISTENT JMSDeliveryMode
password The password to be used to gain access to the connection factory. JMSPassword
priority The JMS priority associated with the request message. Valid values are 0 to 9. The default value is 4. JMSDeliveryMode
replyTo The JNDI destination queue to which reply messages should be sent. JMSReplyTo
timeToLive The lifetime (in milliseconds) of the request message. A value of 0 indicates an infinite lifetime. JMSTimeToLive
userid The userid to be used to gain access to the connection factory. JMSUserid

Here is an example of this format:

<jms:address> format:

<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>

<soap:address> format:

<wsdl:port name="StockQuoteServicePort" 
        binding="sqi:StockQuoteSoapJMSBinding">
    <soap:address location="jms:/queue?connectionFactory=myQCF&destination
=myQ&initialContextFactory=com.ibm.NamingFactory&jndiProviderURL
=iiop://something:900/&targetService=StockQuoteServicePort" />

</wsdl:port>



Related tasks
The JMS providers - Configuring the client and server

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/twsf_prsjwe.html

© Copyright IBM Corporation 2002, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)