2
votes

I am using wso2esb 4.8.0,I am trying to connect my legacy systems which can accept rest calls with post method.

I am sending the same to them but soap envelope is adding by wso2 . current message :

<?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.comapny.org/" xmlns:env="http://com.comany.inn/Envelope"><soap:Header xmlns:p="http://webservices.usedin.com/PService">

   </soap:Header><soap:Body>
      <requested id="12345">
   <authen login="username" password="password">
      <parm name="COMPANY" value="myname"/>
   </authen>
   <actionReq production="doctor" id="1234" type="TINGS">
      <parm name="name" value="12345"/>
   </actionReq>
</requested>
   </soap:Body></soap:Envelope>

Expected one:

     <requested id="12345">
   <authen login="username" password="password">
      <parm name="COMPANY" value="myname"/>
   </authen>
   <actionReq production="doctor" id="1234" type="TINGS">
      <parm name="name" value="12345"/>
   </actionReq>
</requested>

Since this rest cal i can't use format also "format=pox" like in soap services.

my code is like this.

</xquery>
            <send>
              <http uri-template="http://******/webservices/***.php" method="post">
            </send>

Do I need to add any property to remove soap envelope for esb out request.

1
You can use the PayloadFactory to transform the payload docs.wso2.com/display/ESB470/PayloadFactory+Mediator Not sure if it's the best solution since you have almost the same payload.Evgeni Dimitrov
If i do also esb will add the soap envelope while sending message out.user3595078

1 Answers

5
votes

Try to add this property before send mediator :

<property name="messageType" value="application/xml" scope="axis2"/>