0
votes

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>
2

2 Answers

1
votes

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

1
votes

Since ESB 4.8.0, using respond mediator will perform the same.

<respond>