我正在开发 WSO2 ESB 代理服务,其中需要进行 XSLT 转换,从 xml 中获取一部分值并与另一个 .dsb 文件的结果相结合
这是我的财产,价值低于
*<xslt key="conf:/input/proxy_input_transform.xslt"/>
<property name="DETAILS" expression="//QUARTERLY_DATA" />
<QUARTERLY_DATA>
<ROW>
<SAP_CUST_ID>0000905133</SAP_CUST_ID>
<AOC_FLAG>N</AOC_FLAG>
<LOB>AppleCare</LOB>...."
但是当在 outsequence 中调用 .dbs 文件后完成 xlst
<xslt key="conf:/output/proxy_output_transform.xslt" >
<property name="details" expression value="get-property('DETAILS')"/>
</xslt>
我得到了转换后的 xml 中的值,如下所示。
<QUARTERLY_DATA>
<ROW>
<SAP_CUST_ID>0000905133</SAP_CUST_ID>
<AOC_FLAG>N</AOC_FLAG>
<LOB>AppleCare</LOB>....
我不确定为什么“<”被更改为“<”。有人可以就此发表他们的发现吗?注意:我能够成功地从属性中检索值,它只有单个值而不是 XML 标记。在将 xml 放置在消息上下文中时,将属性中的类型设置为“OM”。这是我的代理服务
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="TQS_SIST_BILLING_PCH_N" transports="https http" startOnLoad="true" trace="enable" statistics="enable">
<target>
<inSequence onError="conf:/tqs/common/FaultHandler_Seq.xml">
<property xmlns:sist="http://sist.tqs.ist.apple.com/sist_request" name="IN_SAP_SOLD_TO" expression="//sist:ACC_BILLING_REQ_PCH_FLAG_N/sist:CUST_SRCH_INPUT/sist:SAP_SOLD_TO"/>
<xslt key="conf:/tqs/sist/billing_pch_n/proxy_input_transform.xslt"/>
<property name="REQUEST" value="DETAILS_REQUEST"/>
<property name="SAP_CUST_ID" expression="//ACC_BILLING_REQ_PCH_FLAG_N" type="OM"/>
<send>
<endpoint key="conf:/tqs/sist/billing_pch_n/ds_endpoint.xml"/>
</send>
</inSequence>
<outSequence onError="conf:/tqs/common/FaultHandler_Seq.xml">
<switch source="get-property('REQUEST')">
<case regex="DETAILS_REQUEST">
<log level="custom">
<property name="sequence" value="outSequence - response from Details Service"/>
</log>
<property name="DETAILS" expression="//QUARTERLY_DATA"/>
<log level="custom" separator=",">
<property name="DETAILS------at entry level" expression="get-property('DETAILS')"/>
</log>
<enrich>
<source type="property" clone="true" property="SAP_CUST_ID"/>
<target type="body"/>
</enrich>
<log level="full">
<property name="sequence" value="outSequence - request for Summary Service"/>
</log>
<property name="REQUEST" value="SUMMARY_REQUEST"/>
<send>
<endpoint key="conf:/tqs/sist/billing_pch_n/ds_summary_endpoint.xml"/>
</send>
</case>
<case regex="SUMMARY_REQUEST">
<log level="full">
<property name="sequence" value="outSequence - response from Summary Service"/>
</log>
<log level="custom" separator=",">
<property name="DETAILS------222222" expression="get-property('DETAILS')"/>
</log>
<xslt key="conf:/tqs/sist/billing_pch_n/proxy_output_transform.xslt">
<property name="details" expression="get-property('DETAILS')"/>
</xslt>
<send/>
</case>
</switch>
</outSequence>
</target>