Share this page

# jms_set_message_property

Sets a JMS header or property for the next message to be sent, or uses a JMS header or property to filter received messages.

Example: jms_set_message_property | Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

    int jms_set_message_property( const char * StepName, const char * name, const char * value);

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All input string arguments (char type) except the step name can be parameterized using standard parameterization.

StepName | The name of the step, as it appears in the test tree. Any text can be used.
name | The name of the header or property.
value | The value of the header or property.

jms_set_message_property sets a JMS header or property for the next message to be sent, or uses a JMS header or property to filter received messages.

For Peer-to-Peer messages received using queues, the filter applies to the next message received. To set the filter for the next message, insert jms_set_message_property before jms_receive_message_queue or jms_send_receive_message_queue. After the next message, all messages are received.

For Publish-Subscribe messages received using topics, the filter applies to all messages received for the subscription. To set the filter for an entire subscription, insert jms_set_message_property before jms_subscribe_topic.

The following JMS headers are supported:

- JMSCorrelationID

- JMSDeliveryMode

- JMSExpiration

- JMSMessageID

- JMSPriority

- JMSRedelivered

- JMSTimestamp

- JMSType

A property with any other name is added as a JMS property.

The contentType property determines the sent message type.

Specify the JMSSelector property to:

- Construct a message.

To set several properties, insert multiple jms_set_message_property calls in the script before sending or publishing a message.

- Set a selector (filter) for received messages.

Insert one jms_set_message_property call in the script before subscribing to a topic or receiving a message from queue. Set the value of the JMSSelector property to a string that contains a conditional expression, with full Boolean logic. For more information on the syntax for defining selectors, see the Oracle Interface Message documentation.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: