Search code examples
wso2callesbmediator

why call is not working in wso2 esb


I have a problem with wso2 esb. I wrote a proxy and in that I call an endpoint to do some changes on original input. but the log before call and after call is the same(it should be different). It seems the call is not working at all.when I send respone to outsequence it is null. Can any one say why this happen? (I have tested my endpoint in soupUI)

this is my proxy:

      <inSequence>
     <property name="transport.vfs.ReplyFileName" value="GET" scope="transport"/>
     <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
     <smooks config-key="smooks-csv1">
        <input type="text"/>
        <output type="xml"/>
     </smooks>
     <iterate continueParent="true"
              preservePayload="true"
              attachPath="//csv-set"
              expression="//csv-set/search"
              sequential="true">
        <target>
           <sequence>
              <xslt key="gov:/first.xsl"/>
              <xslt key="gov:/second.xsl"/>
              **<log level="full"/>
              <call blocking="true">
                 <endpoint>
                    <address uri="MyEndPiont"/>
                 </endpoint>
              </call>
              <log level="full"/>**
           </sequence>
        </target>
     </iterate>
     <respond/>
  </inSequence>
  <outSequence>
     <aggregate>
        <completeCondition>
           <messageCount min="0" max="100"/>
        </completeCondition>
        <onComplete expression="//Guest">
        </onComplete>
     </aggregate>
  </outSequence>

Solution

  • Try this. List of changes:

    • Removed respond mediator.
    • Replaced call by send.
    • Added send in out sequence.

        <inSequence>
           <property name="transport.vfs.ReplyFileName" value="GET" scope="transport"/>
           <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
           <smooks config-key="smooks-csv1">
              <input type="text"/>
              <output type="xml"/>
           </smooks>
           <iterate continueParent="true"
                    preservePayload="true"
                    attachPath="//csv-set"
                    expression="//csv-set/search"
                    sequential="true">
              <target>
                 <sequence>
                    <xslt key="gov:/first.xsl"/>
                    <xslt key="gov:/second.xsl"/>
                    <log level="full"/>
                    <send>
                       <endpoint>
                          <address uri="MyEndPiont"/>
                       </endpoint>
                    </send>
                 </sequence>
              </target>
           </iterate>
        </inSequence>
        <outSequence>
           <aggregate>
              <completeCondition>
                 <messageCount min="0" max="100"/>
              </completeCondition>
              <onComplete expression="//Guest">
              </onComplete>
           </aggregate>
           <send />
        </outSequence>