Reputation: 2053
I have one esb mediator, which handles request from esb proxy. When this mediator is configured in wso2 API, the response can be returned to caller. When this mediator is configured in wso2 proxy, the response cannot be returned to caller.
Any one has suggestion? The configuration looks like following:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="abc"
transports="http"
startOnLoad="true"
trace="enable"
statistics="enable">
<description/>
<target>
<inSequence>
<log level="full"/>
<property name="address"
scope="transport"
expression="fn:substring-after(get-property('To'),'/services/abc')"/>
<class name="com.abc.mediator.PatronInfoMediator">
<property name="pmServerAddress" value="http://192.168.112.243:3509/MobileConnectService"></property>
<property name="property" value="M"/>
<property name="languageCode" value="en-US"></property>
</class>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
</proxy>
Upvotes: 0
Views: 2699
Reputation: 2093
Since ESB 4.8.0, using respond mediator will perform the same.
<respond>
Upvotes: 1
Reputation: 5946
You should add :
<header name="To" action="remove"/>
<property name="RESPONSE" value="true"/>
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"/>
<send/>
at the end of your inSequence : there is no call, no send to an endpoint in this sequence so, outSequence will never be exectued
Upvotes: 1