WSDL Extension
The WSDL extensions for defining a JMS endpoint use a special namespace. In order to use the JMS WSDL extensions you will need to add the namespace definition shown below to the definitions element of your contract.
xmlns:soapjms="http://www.w3.org/2010/soapjms/"
Various JMS properties may be set in three places in the WSDL — the binding, the service, and the port. Values specified at the service will propagate to all ports. Values specified at the binding will propagate to all ports using that binding. For example, if the jndiInitialContextFactory is indicated for a service, it will be used for all of the port elements it contains.
JMS Properties. For details refer to the URI query parameters with the same name:
Name |
---|
deliveryMode |
jndiConnectionFactoryName |
jndiInitialContextFactory |
jndiURL |
replyToName |
priority |
timeToLive |
jndiContextParameter |
Here is an example:
Ways to define a Service with JMS transport
<wsdl11:binding name="exampleBinding">
<soapjms:jndiContextParameter name="name" value="value"/>
<soapjms:jndiConnectionFactoryName>
ConnectionFactory
</soapjms:jndiConnectionFactoryName>
<soapjms:jndiInitialContextFactory>
org.apache.activemq.jndi.ActiveMQInitialContextFactory
</soapjms:jndiInitialContextFactory>
<soapjms:jndiURL>tcp://localhost:61616</soapjms:jndiURL>
<soapjms:deliveryMode>PERSISTENT</soapjms:deliveryMode>
<soapjms:priority>5</soapjms:priority>
<soapjms:timeToLive>200</soapjms:timeToLive>
</wsdl11:binding>
<wsdl11:service name="exampleService">
<soapjms:jndiInitialContextFactory>
com.example.jndi.InitialContextFactory
</soapjms:jndiInitialContextFactory>
<soapjms:timeTolive>100</soapjms:timeToLive>
<wsdl11:port name="quickPort" binding="tns:exampleBinding">
<soapjms:timeToLive>10</soapjms:timeToLive>
</wsdl11:port>
<wsdl11:port name="slowPort" binding="tns:exampleBinding">
...
</wsdl11:port>
</wsdl11:service>
If a property is specified at multiple levels, the setting at the most granular level takes precedence (port first, then service, then binding). In the above example, notice the timeToLive property — for the quickPort port, the value will be 10ms (specified at the port level). For the slowPort port, the value will be 100ms (specified at the service level). In this example, the setting in the binding will always be overridden.