wso2中的xslt制作代理服务

xlst in wso2 in making proxy service

这是我的肥皂,我想让这个代理服务发送到我的另一个端点。我用 :

<xslt key="example"></xslt>

但我不能为这个 soap 编写本地条目“添加内联 XML 条目 XML 在 ESB 中作为条目共享的内容(XSLT、策略、WSDL 等...)

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:isompwsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:PersonInfoByEnp soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <enp xsi:type="xsd:string">4577160876000115</enp>
      </urn:PersonInfoByEnp>
   </soapenv:Body>
</soapenv:Envelope>

如果要添加本地条目,可以参考this documentation。在这里您可以找到如何添加本地条目。

然后您可以在代理中使用该本地条目。你不需要 xslt 调解器。 XSLT mediator 将有助于 XSLT 转换。

示例代码:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
   name="SampleProxy"
   transports="https http"
   startOnLoad="true"
   trace="disable">
<description/>
<target>
  <inSequence>
     <payloadFactory media-type="xml">
        <format key="sample-le"/>
        <args/>
     </payloadFactory>
    </inSequence>
  </target>
</proxy>

<localEntry key="sample-le"><![CDATA[abcd]]><description/>
</localEntry>