This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

The publishMessage operation allows you to publish messages to a JMS message broker.

publishMessage
<jms.publishMessage configKey="jms_init"/>
Properties

If required, you can add SOAPAction as an optional parameter to the publishMessage operation:

<connectionFactoryName.SOAPAction>Value</connectionFactoryName.SOAPAction>

You can add the parameter as follows in the publishMessage operation:

<jms.publishMessage configKey="jms_init">
	<QueueConnectionFactory.SOAPAction>Value</QueueConnectionFactory.SOAPAction>
</jms.publishMessage>
Sample request

Following is a sample request that can be handled by the publishMessage operation.

Sample Request for PublishMessage
{
  "success":"ok"
}
Related JMS documentation


Sample configuration

Following is a sample proxy service that illustrates how to connect to a JMS broker with the init operation and use the publishMessage operation to publish messages to a queue.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="JMSAPublisher"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
   <target>
      <inSequence>
         <property name="OUT_ONLY" value="true"/>
         <jms.publishMessage configKey="jms_init"/>
         <respond/>
      </inSequence>
   </target>
   <description/>
</proxy>                                      
  • No labels