setting transport.jms.ContentTypeProperty in the jms URL and setting the value as below:
JMSContentType application/xml
A sample proxy service to achieve this requirement is as below:
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="WeblogicJMSSenderProxy" transports="http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property name="Accept-Encoding" scope="transport" action="remove"/> <property name="Content-Length" scope="transport" action="remove"/> <property name="Content-Type" scope="transport" action="remove"/> <property name="User-Agent" scope="transport" action="remove"/> <log level="custom"> <property name="STATUS:" value="------Message Sent by WeblogicJMSConsumerProxy--------"/> </log> <send> <endpoint> <address uri="jms:/jms/TestJMSQueue1?transport.jms.ConnectionFactoryJNDIName=jms/TestConnectionFactory1&java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory&java.naming.provider.url=t3://localhost:7001&transport.jms.DestinationType=queue&transport.jms.ReplyDestination=jms/Queue2&transport.jms.ContentTypeProperty=JMSContentType"/> </endpoint> </send> </inSequence> <outSequence> <log level="custom"> <property name="STATUS:" value="------------------Out sequence invoked---------------------"/> </log> <log level="full"/> <log level="custom"> <property name="STATUS:" value="------------------Out sequence invoked - Before content type set ---------------------"/> </log> <send/> </outSequence> </target> <parameter name="transport.jms.ContentType"> <rules> <jmsProperty>JMSContentType</jmsProperty> <default>application/xml</default> </rules> </parameter> <description/> </proxy>
No comments:
Post a Comment