LibraryToggle FramesPrintFeedback

Table 3.4 shows all of the WSDL extension elements you can use to configure the JMS transport.

Table 3.4. SOAP/JMS WSDL extension elements

soapjms:jndiInitialContextFactory Specifies the fully qualified Java class name of the JNDI provider. Equivalent to setting the java.naming.factory.initial Java system property.
soapjms:jndiURL Specifies the URL that initializes the JNDI provider. Equivalent to setting the java.naming.provider.url Java system property.
soapjms:jndiContextParameter Enables you to specify an additional property for creating the JNDI InitialContext. Use the name and value attributes to specify the property.
soapjms:jndiConnectionFactoryName Specifies the JNDI name of the JMS connection factory.
soapjms:deliveryModePERSISTENTSpecifies whether to use JMS PERSISTENT or NON_PERSISTENT message semantics. In the case of PERSISTENT delivery mode, the JMS broker stores messages in persistent storage before acknowledging them; whereas NON_PERSISTENT messages are kept in memory only.

Explicitly specifies the reply destination to appear in the JMSReplyTo header. Setting this property is recommended for SOAP invocations that have request-reply semantics. If this property is not set the JMS provider allocates a temporary queue with an automatically generated name.

The value of this property has an interpretation that depends on the variant specified in the JMS URI, as follows:

  • jndi variant—the JNDI name of the destination.

  • queue or topic variants—the actual name of the destination.

soapjms:priority4Specifies the JMS message priority, which ranges from 0 (lowest) to 9 (highest).
soapjms:timeToLive0Time, in milliseconds, after which the message will be discarded by the JMS provider. A value of 0 represents an infinite lifetime.

Example 3.7 shows a WSDL contract for a SOAP/JMS service. It configures the JNDI layer in the binding scope, the message delivery details in the service scope, and the reply destination in the port scope.

Example 3.7. WSDL contract with SOAP/JMS configuration

<wsd;definitions ...
1    xmlns:soapjms=""
  ... >
  <wsdl:binding name="JMSGreeterPortBinding" type="tns:JMSGreeterPortType">
2    <soapjms:jndiInitialContextFactory>
  <wsdl:service name="JMSGreeterService">
3    <soapjms:deliveryMode>NON_PERSISTENT</soapjms:deliveryMode>
    <wsdl:port binding="tns:JMSGreeterPortBinding" name="GreeterPort">
4      <soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue" />
5      <soapjms:replyToName>

The WSDL in Example 3.7 does the following:


Declare the namespace for the SOAP/JMS extensions.


Configure the JNDI connections in the binding scope.


Configure the JMS delivery style to non-persistent and each message to live for one minute.


Specify the target destination.


Configure the JMS transport so that reply messages are delivered on the greeterReply.queue queue.

Comments powered by Disqus
loading table of contents...