wso2 esb 在 xslt 转换后注入少量值
wso2 esb inject few values after xslt transformation
我正在从源 table 读取一些值并写入目标 table.Since 字段的名称和某些值不同,我在 WSO2 ESB 中使用 XSLT 中介。
在 xslt 调解器之后,我想向 payload.Say 之前存储的一些变量中注入更多的值。我不能这样做 xslt 因为这些值在某些变量中。
所以下面是我的 code.What 应该是虚线的代码?
<enrich>
<source clone="true" property="SOURCE_TABLE_PAYLOAD" type="property"/>
<target type="body"/>
</enrich>
<xslt key="gov:/bcogc/transformation/SourcetoTargetTransformation.xslt"/>
----------------ADD SOME MORE VALUES HERE to the payload------------------
<header name="Action" scope="default" value="urn:inserttotargettable"/>
<call>
<endpoint key="gov:/endpoints/INSERT_DataService_EP.xml"/>
</call>
请点灯
您可以再次使用 enrich mediator,例如,
<property name="orderID" scope="default" description="orderID">
<orderID xmlns="">2</orderID>
</property>
<enrich>
<source clone="true" xpath="$ctx:orderID"/>
<target action="sibling" xpath="//orders"/>
</enrich>
这里定义了 orderID 属性,所以现在您可以将 属性 添加为来自 XSLT 的请求的同级,因此在丰富 [=12] 之后请求将如下所示=]
<orders>
<order>
<price>50.00</price>
<quantity>500</quantity>
<symbol>IBM</symbol>
<comment>REF 10053</comment>
</order>
<order>
<price>18.00</price>
<quantity>500</quantity>
<symbol>MSFT</symbol>
<comment>ref 20088398289</comment>
</order>
</orders>
<orderID>2</OrderID>
我正在从源 table 读取一些值并写入目标 table.Since 字段的名称和某些值不同,我在 WSO2 ESB 中使用 XSLT 中介。 在 xslt 调解器之后,我想向 payload.Say 之前存储的一些变量中注入更多的值。我不能这样做 xslt 因为这些值在某些变量中。 所以下面是我的 code.What 应该是虚线的代码?
<enrich>
<source clone="true" property="SOURCE_TABLE_PAYLOAD" type="property"/>
<target type="body"/>
</enrich>
<xslt key="gov:/bcogc/transformation/SourcetoTargetTransformation.xslt"/>
----------------ADD SOME MORE VALUES HERE to the payload------------------
<header name="Action" scope="default" value="urn:inserttotargettable"/>
<call>
<endpoint key="gov:/endpoints/INSERT_DataService_EP.xml"/>
</call>
请点灯
您可以再次使用 enrich mediator,例如,
<property name="orderID" scope="default" description="orderID">
<orderID xmlns="">2</orderID>
</property>
<enrich>
<source clone="true" xpath="$ctx:orderID"/>
<target action="sibling" xpath="//orders"/>
</enrich>
这里定义了 orderID 属性,所以现在您可以将 属性 添加为来自 XSLT 的请求的同级,因此在丰富 [=12] 之后请求将如下所示=]
<orders>
<order>
<price>50.00</price>
<quantity>500</quantity>
<symbol>IBM</symbol>
<comment>REF 10053</comment>
</order>
<order>
<price>18.00</price>
<quantity>500</quantity>
<symbol>MSFT</symbol>
<comment>ref 20088398289</comment>
</order>
</orders>
<orderID>2</OrderID>