Hi devs,

I have below XML in the message context.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <*ns:getUserListOfRoleResponse* xmlns:ns="
http://service.ws.um.carbon.wso2.org";>
         <ns:return>usersx</ns:return>
         <ns:return>doctor</ns:return>
      </*ns:getUserListOfRoleResponse*>
   </soapenv:Body>
</soapenv:Envelope>

Is it possible to transform this to below one, just with a payload factory
(and xpath)?

      <*ns:results* xmlns:ns="http://service.ws.um.carbon.wso2.org";>
         <ns:return>usersx</ns:return>
         <ns:return>doctor</ns:return>
      </*ns:results*>

Basically what I tried is this with different xpaths, but none of them gave
me the expected output.

         <payloadFactory media-type="xml">
            <format>
               <results>$1</results>
            </format>
            <args>
               <arg xmlns:ns="http://service.ws.um.carbon.wso2.org";
evaluator="xml" *expression="//ns:getUserListOfRoleResponse/node()"*/>
            </args>
         </payloadFactory>

Appreciate your help.

Thanks,

-- 
*Bhathiya Jayasekara*
*Senior Software Engineer,*
*WSO2 inc., http://wso2.com <http://wso2.com>*

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
<http://www.linkedin.com/in/bhathiyaj>*
*Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
*Blog: http://movingaheadblog.blogspot.com
<http://movingaheadblog.blogspot.com/>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to