[英]wso2 esb 4.6.0 and Wso2 DSS 3.0.1 with xslt mediator
Here my services 这是我的服务
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="Getxslt"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence onError="fault">
<xslt key="emptransform">
</xslt>
<payloadFactory>
<format>
<select xmlns=""/>
</format>
</payloadFactory>
<send>
<endpoint>
<address uri="http://localhost:9764/services/emp_DataService/" format="soap11"/>
</endpoint>
</send>
</inSequence>
<outSequence onError="fault">
<log level="full"/>
<send/>
</outSequence>
</target>
<parameter name="serviceType">proxy</parameter>
</proxy>
XSLT is XSLT是
<?xml version="1.0" encoding="UTF-8"?>
<localEntry xmlns="http://ws.apache.org/ns/synapse" key="emptransform">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns1="http://ws.wso2.org/dataservice"
version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="ns1:Body">
<ns1:select/>
</xsl:template>
</xsl:stylesheet>
<description/>
</localEntry>
DSS Service :- Dss:- DSS服务:-Dss:-
<data name="emp_DataService" serviceNamespace="http://ws.wso2.org/dataservice">
<config id="default">
<property name="carbon_datasource_name">Signingtest</property>
</config>
<query id="select_all_emp_query" useConfig="default">
<sql>SELECT eno, username, password FROM public.emp</sql>
<result element="empCollection" rowName="emp">
<element column="eno" name="eno" xsdType="xs:integer"/>
<element column="username" name="username" xsdType="xs:string"/>
<element column="password" name="password" xsdType="xs:string"/>
</result>
</query>>
<operation name="select">
<call-query href="select_all_emp_query"/>
</operation>
</data>
I am getting following error:- 我收到以下错误:
XSLT in wso2 esb gives an error wso2 esb中的XSLT给出错误
{"ResponseJSON":{"Body":{"Data":{"Exception":"Unable to perform XSLT transformation using : Value {name ='null', keyValue ='emptransform'} against source XPath : s11:Body\/child::*[position()=1] | s12:Body\/child::*[position()=1]"}},"Status":"0"}}
i am using wso2 esb 4.6.0 and DSS 3.0.1 , i written proxy service that uses xslt mediator, when i am executing my proxy it gives the following error . 我正在使用wso2 esb 4.6.0和DSS 3.0.1,我编写了使用xslt中介程序的代理服务,当我执行代理时,会出现以下错误。 Could you please correct me, where did i mistake.. 你能纠正我,我在哪里弄错了..
What is the payload you are trying to send to the proxy ? 您要发送给代理的有效负载是多少? In your XSLT you match the BODY with the namespace " http://ws.wso2.org/dataservice ", are you sending a payload which have that name space ? 在您的XSLT中,将BODY与名称空间“ http://ws.wso2.org/dataservice ”匹配,您是否正在发送具有该名称空间的有效负载? Apparently it is not. 显然不是。 Best thing is, use a 3rd party online xslt evaluator and run our xslt against the request payload and verify your xslt behaves correctly prior to sending it through the ESB. 最好的办法是,使用第三方在线xslt评估程序,对请求有效负载运行xslt,并在通过ESB发送xslt之前验证您的xslt行为是否正确。 That way it will be easy for you to isolate errors. 这样,您将很容易隔离错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.