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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
14.5. Using WSDL to configure JMS
14.5.1. JMS WSDL Extension Namespance Link kopierenLink in die Zwischenablage kopiert!
Example 14.5. JMS WSDL extension namespace
xmlns:jms="http://cxf.apache.org/transports/jms"
xmlns:jms="http://cxf.apache.org/transports/jms"
14.5.2. Basic JMS configuration Link kopierenLink in die Zwischenablage kopiert!
Overview Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
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 14.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 Section 14.6, “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 14.6, “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 Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
port specification.
Example 14.6. JMS WSDL port specification
14.5.3. JMS client configuration Link kopierenLink in die Zwischenablage kopiert!
Overview Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
jms:client element. The jms:client element is a child of the WSDL port element and has one attribute:
Example Link kopierenLink in die Zwischenablage kopiert!
Example 14.7. WSDL for a JMS consumer endpoint
14.5.4. JMS provider configuration Link kopierenLink in die Zwischenablage kopiert!
Overview Link kopierenLink in die Zwischenablage kopiert!
- 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 Link kopierenLink in die Zwischenablage kopiert!
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 Link kopierenLink in die Zwischenablage kopiert!
Example 14.8. WSDL for a JMS provider endpoint