Search code examples
wso2apache-synapsewso2-esb

Callout mediator doe'snot giving any response in WSO2 ESB 4.7.0


While I am using call out mediator in wso2 esb , with DSS Endpoint I am getting the request only, I am not getting response, even I put log in the out sequence. Here I am sending my proxy service.

 <proxy xmlns="http://ws.apache.org/ns/synapse"
           name="Binaryformat"
           transports="https http"
           startOnLoad="true"
           trace="disable">
       <description/>
       <target>
          <inSequence>
    <property name="messageType" value="application/json" scope="axis2"/>
             <property name="ContentType" value="application/json" scope="axis2"/>
             <log level="full">
                <property name="M1" value="*************Callout  PROXY*************"/>
             </log>

             <callout serviceURL="http://192.168.1.201:9769/services/emp_DataService/">
                <source type="envelope"/>
                <target key="response"/>
             </callout>
             <log level="full">
                <property name="Status" expression="get-property('response')"/>
             </log>
             <header name="To" action="remove"/>
             <property name="RESPONSE" value="true"/>
             <!--<property name="OUT_ONLY" value="true"/>-->
             <send/>
          </inSequence>
          <outSequence>
            <log level="full">
                <property name="Status" expression="get-property('response')"/>
             </log>
    <payloadFactory media-type="xml">
                <format>
    <response>outonly</response>
                </format>
                <args/>
             </payloadFactory>
             <property name="OUT_ONLY" value="true"/>
             <send/>
          </outSequence>
       </target>
    </proxy>

Solution

  • callout mediator is synchronous, it will return the response in the same sequence (your inSequence, by doing a blocking call) : your outSequence is unnecessary.

    however, you should add a faultSequence to log any error

    you should use tcpmon (launch tcpmon in ESB_HOME/bin) between ESB and your endpoint to verify request content going to your service and verify if you obtain a response from your service.