Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Ce contenu n'est pas disponible dans la langue sélectionnée.
26.2. Using WSDL to configure JMS
Example 26.8. JMS WSDL extension namespace
xmlns:jms="http://cxf.apache.org/transports/jms"
xmlns:jms="http://cxf.apache.org/transports/jms"
26.2.1. Basic JMS configuration Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
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.
Specifying the JMS address Copier lienLien copié sur presse-papiers!
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 26.5, “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 Section 26.3, “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 Section 26.3, “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. |
jms:address WSDL element uses a jms:JMSNamingProperties child element to specify additional information needed to connect to a JNDI provider.
Specifying JNDI properties Copier lienLien copié sur presse-papiers!
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.
java.naming.factory.initialjava.naming.provider.urljava.naming.factory.objectjava.naming.factory.statejava.naming.factory.url.pkgsjava.naming.dns.urljava.naming.authoritativejava.naming.batchsizejava.naming.referraljava.naming.security.protocoljava.naming.security.authenticationjava.naming.security.principaljava.naming.security.credentialsjava.naming.languagejava.naming.applet
Example Copier lienLien copié sur presse-papiers!
port specification.
Example 26.9. JMS WSDL port specification
26.2.2. JMS client configuration Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
ByteMessage or a JMS TextMessage.
ByteMessage the consumer endpoint uses a byte[] as the method for storing data into and retrieving data from the JMS message body. When messages are sent, the message data, including any formating information, is packaged into a byte[] and placed into the message body before it is placed on the wire. When messages are received, the consumer endpoint will attempt to unmarshall the data stored in the message body as if it were packed in a byte[].
TextMessage, the consumer endpoint uses a string as the method for storing and retrieving data from the message body. When messages are sent, the message information, including any format-specific information, is converted into a string and placed into the JMS message body. When messages are received the consumer endpoint will attempt to unmarshall the data stored in the JMS message body as if it were packed into a string.
TextMessage, the receiving JMS application will get a text message containing all of the SOAP envelope information.
Specifying the message type Copier lienLien copié sur presse-papiers!
jms:client element. The jms:client element is a child of the WSDL port element and has one attribute:
Example Copier lienLien copié sur presse-papiers!
Example 26.10. WSDL for a JMS consumer endpoint
26.2.3. JMS provider configuration Copier lienLien copié sur presse-papiers!
Overview Copier lienLien copié sur presse-papiers!
- how messages are correlated
- the use of durable subscriptions
- if the service uses local JMS transactions
- the message selectors used by the endpoint
Specifying the configuration Copier lienLien copié sur presse-papiers!
jms:server element. The jms:server element is a child of the WSDL wsdl:port element and has the following attributes:
| Attribute | Description |
|---|---|
useMessageIDAsCorrealationID | Specifies whether JMS will use the message ID to correlate messages. The default is false. |
durableSubscriberName | Specifies the name used to register a durable subscription. |
messageSelector | Specifies the string value of a message selector to use. For more information on the syntax used to specify message selectors, see the JMS 1.1 specification. |
transactional | Specifies whether the local JMS broker will create transactions around message processing. The default is false. [a] |
Example Copier lienLien copié sur presse-papiers!
Example 26.11. WSDL for a JMS provider endpoint