Use the SOAP over JMS provider

The SOAP message, including the SOAP envelope, is wrapped with a JMS message and put on the appropriate Queue. The container receives the JMS message and removes the SOAP message to send to the client.

The SOAP over JMS provider - writing the WSDL extension

SOAP protocol messages are carried on the JMS transport with the JMS body type TextMessage if the message is strictly XML.

WSDL Binding
The WSDL Binding for SOAP over JMS varies only slightly from the SOAP over HTTP binding. The transport element under the soap:binding indicates that JMS is being used.
RPC style: If the style is set to rpc, then it is assumed that an operation is being invoked on the Web service endpoint. The Java parameters and response holders are encoded in the same way as for the standard WSIF SOAP binding:

<soap:binding style="rpc"  transport="http://schemas.xmlsoap.org/soap/jms" />

When a SOAP/JMS binding is being used, the <wsdl:port> must contain a <jms:address> element to identify the JMS Queue to be used.

Address:
The address within the port, within the service, within the WSDL, provides the information required for a client to correctly connect to the Web service using the JMS programming model. Typically, it is the stubs generated to support the SOAP/JMS binding that act as the JMS client. This does not preclude the Web service client from using the JMS programming model directly. The address element under the service and port must take this form:

<jms:address
  
    destinationStyle= "queue"  
    jmsVendorURI = "http://ibm.com/ns/mqseries"?
    initialContextFactory= "com.ibm.NamingFactory"?
    jndiProviderURL= "iiop://something:900/wherever"?
    jndiConnectionFactoryName= "orange"
    jndiDestinationName= "fred"
/>
where ? means optional. The vendor URI is a string that uniquely identifies the JMS implementation. WSIF ignores this URI, which is used by the client developer and perhaps the client implementation to determine if it has access to the correct JMS provider in the client runtime.
The connectionFactory attribute gives the name of a JMS ConnectionFactory object, which can be looked up within the JNDI context given by the jndiContext attribute. This ConnectionFactory can be used to create a JMS connection to the JMS provider instance that owns the Queue. In a simple configuration, this ConnectionFactory is the actual ConnectionFactory used by the server message listener and by the clients. However, both server and clients can use different ConnectionFactories, provided that they all create Connections to the same JMS provider instance.
Here is the JNDI usage pattern:
<jms:address destinationStyle= "queue"
     jndiConnectionFactoryName= "orange"
    jndiDestinationName= "fred"
>
This usage pattern requires the runtime to have a default JNDI provider configured. The provider URL and context factory can also be added to this:
<jms:address destinationStyle="queue"
    initialContextFactory = "com.ibm.Naming" jndiProviderURL= "iiop://server:900/"
    jndiConnectionFactoryName= "orange"
    jndiDestinationName= "fred"
>

Headers and Properties JMS headers and properties can be set using the <jms:property> extension within the binding. This maps a part of a message into a JMS property. For example:

<jms:property name="Priority"  {part="requestPriority" | value="fixedValue"} />
The header can also be set in the jms:address component with a literal value:
<jms:property name="Priority"  value="fixedValue" />

This binding extension is shared with the Native JMS binding.

WSDL Binding 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: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/v />
            </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/" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>