The SOAP over JMS protocol is defined by the World Wide Web Consortium(W3C) as a way of providing a more reliable transport layer to the customary SOAP/HTTP protocol used by most services. The Fuse Services Framework implementation is fully compliant with the specification and should be compatible with any framework that is also compliant.
This transport uses JNDI to find the JMS destinations. When an operation is invoked, the request is packaged as a SOAP message and sent in the body of a JMS message to the specified destination.
To use the SOAP/JMS transport:
Specify that the transport type is SOAP/JMS.
Specify the target destination using a JMS URI.
Optionally, configure the JNDI connection.
Optionally, add additional JMS configuration.
You configure a SOAP binding to use the JMS transport when specifying the WSDL
binding. You set the soap:binding
element's
transport
attribute to
http://www.w3.org/2010/soapjms/
.
Example 3.1 shows a WSDL binding that uses SOAP/JMS.
Example 3.1. SOAP over JMS binding specification
<wsdl:binding ... > <soap:binding style="document" transport="http://www.w3.org/2010/soapjms/" /> ... </wsdl:binding>
You specify the address of the JMS target destination when specifying the
WSDL port for the endpoint. The address specification for a SOAP/JMS endpoint uses
the same soap:address
element and attribute as a SOAP/HTTP
endpoint. The difference is the address specification. JMS endpoints use a JMS URI as
defined in the URI
Scheme for JMS 1.0. Example 3.2 shows the syntax for a JMS
URI.
Table 3.1 describes the available variants for the JMS URI.
Table 3.1. JMS URI variants
Variant | Description |
---|---|
jndi | Specifies that the destination is a JNDI name for the target destination. When using this variant, you must provide the configuration for accessing the JNDI provider. |
topic | Specifies that the destination is the name of the topic to be used as the
target destination. The string provided is passed into
Session.createTopic() to create a representation of the
destination. |
queue | Specifies that the destination is the name of the queue to be used as the
target destination. The string provided is passed into
Session.createQueue() to create a representation of the
destination. |
The options
portion of a JMS URI are used to configure the
transport and are discussed in JMS URIs.
Example 3.3 shows the WSDL port entry for a SOAP/JMS endpoint whose target destination is looked up using JNDI.
Example 3.3. SOAP/JMS endpoint address
<wsdl:port ... > ... <soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue" /> </wsdl:port>
For working with SOAP/JMS services in Java see Using SOAP over JMS in Developing Applications Using JAX-WS.
The SOAP/JMS provides several ways to configure the JNDI connection and the JMS transport: