Thursday, September 15, 2016

Handeling namespaces in xpath expressions of WSO2 ESB payload mediator

You could checkout payload factory mediator of WSO2 ESB in https://docs.wso2.com/display/ESB500/PayloadFactory+Mediator.  If you need to provide an xml input that has namespaces (other than default namespace) included, and you need to access some node of this in <args> of payloadFactory mediator you could do it like this with xpath.

 <payloadFactory media-type="xml">
<format key="conf:resources/output.xml"/>
    <args>
      <arg xmlns:ns0="http://sample.org" expression="//ns0:UserRequest" />
    </args>
  </payloadFactory>



No comments:

Post a Comment