The JMS extensibility elements for binding abstract WSDL messages to JMS messages fall into several sections.
The JMS binding extensibility element indicates a binding that is of interest to the JMS Binding Component. This element is an empty element that serves as a marker enabling the JMS Binding Component to gather JMS "binding" information described by the other JMS extensibility elements.
The JMS binding extensibility element must be specified in the WSDL to define a JMS protocol-based binding.
The following example illustrates the JMS binding extensibility element.
<binding name="bindingJMSOneWayOut" type="tns:portTypeOneWayOut"> <jms:binding></jms:binding> ... </binding> |
The JMS operation extensibility element indicates an operation binding that is of interest to the JMS Binding Component. This element has attributes and child elements that are used to define JMS message delivery options for the JMS Binding Component.
The destination and destinationType attributes are required. The other attributes are optional.
The following attributes apply to both providers and consumers: destination, destinationType, and transaction.
The following attributes apply to providers only: deliveryMode, timeToLive, priority, disableMessageID, disableMessageTimeStamp, timeout, and clientID.
The following attributes apply to consumers only: messageSelector, subscriptionDurability, subscriptionName, batchSize, maxConcurrentConsumers, and redeliveryHandling.
Attribute |
Description |
Example |
---|---|---|
Defines the destination where messages are sent or received. |
InvoiceTopic |
|
Specifies the destination type. The valid values are Queue and Topic. |
Topic |
|
transaction |
Defines the transaction type for the JMS protocol based operation. The valid values are NoTransaction and XATransaction. XA in-out operations are supported with inbound message flows (when the JMS Binding Component acts as a consumer of messages). They are not supported with outbound message flows (when the JMS Binding Component acts as a provider of messages). The JMS Binding Component generates a deployment error, indicating that this type of operation is not supported, when the transaction attribute is set to XATransaction for in-out operations with a provisioning endpoint. |
|
The message delivery mode to use when sending a message. The valid values are PERSISTENT and NON_PERSISTENT. The default value is NON_PERSISTENT. |
|
|
The time in milliseconds (from the dispatched time) that a produced message should be retained by the message system. |
120000 |
|
Defines the message priority for a message producer. The valid values are 0 through 9, where 0 is lowest priority and 9 is highest priority. The default value is 4. |
4 |
|
Indicates whether message IDs are disabled for a message producer. The valid values are true and false. The default value is false. Sun Java System Message Queue ignores the disableMessageID attribute when it is a provider of messages. |
|
|
Indicates whether message timestamps are disabled for a message producer. The valid values are true and false. The default value is false. |
|
|
The timeout in milliseconds on a message consumer receive for a reply message. This attribute applies only to the provider request reply. |
120000 |
|
Defines a unique client ID. The durableName will be used as the clientID if a durable subscriber is used but not set. |
ClientID123 |
|
Enables you to filter messages. A message selector consists of a boolean expression, such as Age > 30. |
JMSCorrelationID='88888888' AND JMSType='SUN' |
|
Determines the durability of the topic subscriber. The valid values are Durable and NonDurable. The default value is NonDurable. |
|
|
The name that is used to denote the durable subscription. This attribute is used only with a durable subscriber (the destination is a topic and the subscriptionDurability attribute is set to Durable). |
SunStockSubscriptionName |
|
If defined with a positive integer, this attribute specifies that the messages received will be in a batch. The number of messages in the batch could be less than or equal to the specified size. |
20 |
|
If defined with a positive integer and the destination type is Queue, this attribute specifies the maximum number of concurrent receivers that can process messages. The default value is 15 if the destination type is Queue. |
15 |
|
Specifies the concurrency mode. The valid values are sync and cc. There is no concurrent processing for topics in sync mode. |
|
|
Specifies what actions to take if an error occurs in processing the JMS message received from the JMS destination. For more information, see Configuring Redelivery Handling. |
5:1000; 10:5000 |
The following example illustrates the JMS operation extensibility element.
... <operation name="Operation1"> <jms:operation destination="MyTopic" destinationType="Topic" messageSelector="JMSType='FOO.Type'"/> ... </operation> ... |
The messageType and use attributes are required. The other attributes are optional.
Attribute |
Description |
Example |
---|---|---|
Defines the type of JMS messages being created and sent to the JMS destination. The valid values are TextMessage and MapMessage. |
|
|
parts |
If the messageTypeattribute is set to TextMessage, then this attribute defines the parts from the WSDL message that comprise the text payload. Each part in the list is delimited by a space. |
msgPart1,msgPart2 |
use |
Defines the use type that affects how the message is interpreted. This attribute is currently supported as a string literal. |
literal |
encodingStyle |
This attribute is reserved for future use. |
|
References the message part that contains the value for the JMSCorrelationID header. |
partCorrelationID |
|
deliveryMode |
Defines the static value for the JMSDeliveryMode header. |
NON_PERSISTENT |
deliveryModePart |
References the message part that contains the value for the JMSDeliveryMode header. |
partDeliveryMode |
priority |
Defines the static value for the JMSPriority header. |
5 |
priorityPart |
References the message part that contains the value for the JMSPriority header. |
partPriority |
type |
Defines the static value for the JMSType header. |
MyMessageType |
typePart |
References the message part that contains the value for the JMSType header. |
partType |
The following example illustrates the JMS message extensibility element.
... <jms:binding></jms:binding> <operation name="operationOneWayOut"> <jms:operation destination="MyTopic" destinationType="Topic" messageSelector="JMSType='FOO.Type'"/> <input name="input"> <!—jms:message defines the WSDL message to/from jms message mappings --> <jms:message messageType="MapMessage" use="literal" correlationIdPart=”msgPart1” deliveryModePart=”msgPart2” priorityPart=”msgPart3” typePart=”msgPart4” messageIDPart=”msgPart5” timestampPart=”msgPart6”> <jms:mapmessage> <jms:mappart part="partBoolean" type="boolean" name="BooleanMapEntry"> </jms:mappart> <jms:mappart part="partChar" type="char" name="CharMapEntry"> </jms:mappart> </jms:mapmessage > </jms:message> </input> </jms:operation> </operation> </jms:binding> ... |
The JMS properties extensibility element is a collection of property elements. It is an optional child element of the JMS message extensibility element.
Each property element defines a mapping of a JMS message user property, either to or from a WSDL message part.
The JMS property element includes the following attributes, all of which are required.
Attribute |
Description |
Example |
---|---|---|
name |
The name of the JMS property that is mapped to the message part. |
JMSProp1 |
part |
The name of the message part to which the JMS property is mapped. |
msgPart1 |
propertyType |
The type of the JMS property. The valid values are boolean, short, int, long, float, double, or string. |
string |
The following example illustrates the JMS properties and property extensibility elements.
... <jms:message messageType="TextMessage" textPart="partBody"> <jms:properties> <jms:property part="partPropString" propertyType="string" name="AppStringProperty"> </jms:property> </jms:properties> </jms:message> ... |
When the exchange involves a JMS MapMessage type, the JMS mapmessage extensibility element is used to define the mapping of the JMS MapMessage to the WSDL message parts and vice versa.
This element is a child element the JMS message extensibility element. The mapmessage element is a collection of one or more mappart elements.
The JMS mappart element contains the following attributes, all of which are required.
Element Name |
Description |
Example |
---|---|---|
name |
The name of the mapmessage property that is mapped to the message part. |
JMSProp1 |
part |
The name of the message part that is mapped to the mapmessage property. |
msgPart1 |
type |
The Java type of the JMS mapmessage property. |
string |
The following example illustrates the JMS mapmessage and mappart extensibility elements.
... <jms:message messageType="MapMessage"> <jms:mapmessage> <jms:mappart part="partBoolean" type="boolean" name="BooleanMapEntry"> </jms:mappart> <jms:mappart part="partChar" type="char" name="CharMapEntry"> </jms:mappart> </jms:mapmessage> </jms:message> ... |