The JMS address information is provided using the jms:address
element and its child, the jms:JMSNamingProperties
element. The
jms:address
element’s attributes specify the information needed to
identify the JMS broker and the destination. The
jms:JMSNamingProperties
element specifies the Java properties
used to connect to the JNDI service.
![]() | Important |
---|---|
Information specified using the JMS feature will override the information in the endpoint's WSDL file. |
The basic configuration for a JMS endpoint is done by using a
jms:address
element as the child of your service’s
port
element. The jms:address
element
used in WSDL is identical to the one used in the configuration file. Its attributes are listed
in Table 4.2.
Table 4.2. JMS endpoint attributes
Attribute | Description |
---|---|
destinationStyle
| Specifies if the JMS destination is a JMS queue or a JMS topic. |
jndiConnectionFactoryName
| Specifies the JNDI name bound to the JMS connection factory to use when connecting to the JMS destination. |
jmsDestinationName
| Specifies the JMS name of the JMS destination to which requests are sent. |
jmsReplyDestinationName
| Specifies the JMS name of the JMS destinations where replies are sent. This attribute allows you to use a user defined destination for replies. For more details see Using a Named Reply Destination. |
jndiDestinationName
| Specifies the JNDI name bound to the JMS destination to which requests are sent. |
jndiReplyDestinationName
| Specifies the JNDI name bound to the JMS destinations where replies are sent. This attribute allows you to use a user defined destination for replies. For more details see Using a Named Reply Destination. |
connectionUserName
| Specifies the user name to use when connecting to a JMS broker. |
connectionPassword
| Specifies the password to use when connecting to a JMS broker. |
The jms:address
WSDL element uses a
jms:JMSNamingProperties
child element to specify additional
information needed to connect to a JNDI provider.
To increase interoperability with JMS and JNDI providers, the
jms:address
element has a child element,
jms:JMSNamingProperties
, that allows you to specify the values
used to populate the properties used when connecting to the JNDI provider. The
jms:JMSNamingProperties
element has two attributes:
name
and value
.
name
specifies the name of the property to set.
value
attribute specifies the value for the specified
property. jms:JMSNamingProperties
element can also be used
for specification of provider specific properties.
The following is a list of common JNDI properties that can be set:
java.naming.factory.initial
java.naming.provider.url
java.naming.factory.object
java.naming.factory.state
java.naming.factory.url.pkgs
java.naming.dns.url
java.naming.authoritative
java.naming.batchsize
java.naming.referral
java.naming.security.protocol
java.naming.security.authentication
java.naming.security.principal
java.naming.security.credentials
java.naming.language
java.naming.applet
For more details on what information to use in these attributes, check your JNDI provider’s documentation and consult the Java API reference material.
Example 4.5 shows an example of a JMS WSDL port
specification.
Example 4.5. JMS WSDL port specification
<service name="JMSService"> <port binding="tns:Greeter_SOAPBinding" name="SoapPort"> <jms:address jndiConnectionFactoryName="ConnectionFactory" jndiDestinationName="dynamicQueues/test.Celtix.jmstransport" > <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.activemq.jndi.ActiveMQInitialContextFactory" /> <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61616" /> </jms:address> </port> </service>