xml - OSB replace node -


i've been trying replace node action "replace" don't understand, hope me.

i've errorhandler, inside stage , inside; assign > replace > reply.

in assign; expression: $body variable: faultstring  in replace; xpath: . in variable: faultstring expression: $body replace node contents  in reply; failure 

so here i'm getting echo, this;

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://www.xxxx.com.mx/xxxx/xxxxxxx">        <soapenv:header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soapenv:header>        <soapenv:body>           <cli:getxxxxxxxxxxxxxxx>              <json>{"principal":"principal","secundario":"secundario"}</json>           </cli:getxxxxxxxxxxxxxxx>        </soapenv:body> </soapenv:envelope> 

i want replace node

<json>{"principal":"principal","secundario":"secundario"}</json> 

with;

<json>{"otracosa":"otro","final":"final"}</json> 

by way i'm getting echo when osb don't reach endpoint , want replace said.

many in advance.

in order replace want use configuration:

xpath: ./*:getxxxxxxxxxxxxxxx/json in variable: $body expression: <json>{"otracosa":"otro","final":"final"}</json> replace entire node 

another option:

xpath: ./*:getxxxxxxxxxxxxxxx/json in variable: $body expression: xs:string('{"otracosa":"otro","final":"final"}') replace node contents 

some explanation: (with words)

variable: payload want replace. root variable.

xpath: xpath node want replace in variable. in example "." root bariable, "" can namespace. (you can use "cli" instead "" if define namespace in ide)

expression: data want put.

replace entire node/replace node content: if want replace content including tag xpath or content inside tags. put 2 examples same.

about echo, maybe have no route node, or maybe not reaching endpoint. response pipeline run in separate thread, if have no route node, echo created response pipeline.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -