How to give a response to client using wso2esb JmsQueue
i am using wso2esb4.7.0 and activeMQ 5.8.0 my issue is i am storing
messages into queue If message stores successfully i need to respond to
client with proper message.In wso2esb we have only
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
but i wish to pass the custom message to client my configure is like this
my storing is working fine but response has been failed how to achieve
proper response
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="JmsStore"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence onError="fault">
<property name="messageType" value="application/json"
scope="axis2"/>
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Body>$1</Body>
</ResponseJSON>
</format>
<args>
<arg evaluator="xml"
expression="get-property('Body')"/>
</args>
</payloadFactory>
<send>
<endpoint>
<address
uri="jms:/jmsProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://127.0.0.1:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
</inSequence>
<outSequence onError="fault">
<property name="RESPONSE" value="true" scope="default"
type="STRING"/>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Body>
<Status>200</Status>
<Datalist>
<Message>Success</Message>
</Datalist>
</Body>
</ResponseJSON>
</format>
<args/>
</payloadFactory>
<send/>
</outSequence>
</target>
</proxy>
i have tried with this and tried in some other way also when ever i am
sending i receive in some other sequence from their i am sending response
to client even though that one also not working
config like this
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="JmsStore"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence onError="fault">
<property name="messageType" value="application/json"
scope="axis2"/>
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Body>$1</Body>
</ResponseJSON>
</format>
<args>
<arg evaluator="xml" expression="get-property('Body')"/>
</args>
</payloadFactory>
<send receive="JmsStore_Seq2">
<endpoint>
<address
uri="jms:/jmsProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://127.0.0.1:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
</inSequence>
<outSequence onError="fault">
<send/>
</outSequence>
</target>
</proxy>
and my sequence is like this but process is not forwarding in to sequence
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="JmsStore_Seq2">
<log>
<property name="log" value="working log"/>
<property name="RESPONSE" value="true" scope="default"
type="STRING"/>
</log>
<header name="To" action="remove"/>
<property name="RESPONSE" value="true" scope="default" type="STRING"/>
<payloadFactory>
<format>
<ResponseJSON xmlns="">
<Body>
<Status>200</Status>
<Datalist>
<Message>Success</Message>
</Datalist>
</Body>
</ResponseJSON>
</format>
<args/>
</payloadFactory>
<send/>
</sequence>
how i am achive this i have done all the changes my messges is going well
but my client is not getting response from faisal shaik
No comments:
Post a Comment