简体   繁体   English

wso2 esb丰富目标xml节点

[英]wso2 esb enrich target xml node

I have an xml which is following structure 我有一个下面的结构的XML

<XML><Payload><InXML></InXML><Endpoint><Response/></EndPoint>

i want to enrich this payload tag InXML , i have tried the following way but it seems it's failing and works only if we enrich the xml property/body as a whole, so it gets appended to <XML> tag as a child but not to InXML 我想丰富此有效负载标签InXML ,我尝试了以下方法,但它似乎失败了,并且仅当我们丰富整个xml属性/主体时才起作用,因此将它作为子InXML附加到<XML>标签上,而不是InXML

Suppose the above xml is current set in body 假设上面的xml是当前在body中设置的

<enrich>
<source type="property" clone="true" property="inputXML"/>
<target type="custom" action="child" xpath="//InXML"/>
</enrich>

I have referred this as well but my case is different. 我也提到了这一点 ,但我的情况有所不同。

If you have defined the inputXML as bellow before the enrich mediator, then make sure to define the type attribute as "OM". 如果您在胖介体之前将inputXML定义为波纹管,那么请确保将type属性定义为“ OM”。

Eg: 例如:

<property name="inputXML" expression="//foo/bar" type="OM"/>

The selection of target action "replace" or "child" depends on the source type (when the defined property for the source isn't set with type="OM"). 目标操作“替换”或“子代”的选择取决于源类型(当未为源定义的属性未设置type =“ OM”时)。

source is property: 来源是财产:

<source type="property" clone="true" property="inputXML"/> <target type="custom" action="replace" xpath="//InXML"/>

source is inline: 源是内联的:

<source type="inline" clone="true"> <test>1234</test> </source> <target type="custom" action="child" xpath="//InXML"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM