【发布时间】:2014-02-01 10:33:10
【问题描述】:
我正在尝试为 ESB 服务调用输出序列中的 XSLT 转换,但出现错误....
我有一个返回 XML 的 WSO2 数据服务服务器,并且我已经成功地在 ESB 中代理了它。但是当我添加 Out 序列时......
<outSequence>
<log level="full"/>
<property name="messageType" value="text/xml" scope="axis2" type="STRING"/>
<xslt key="out_transform2"/>
<send/>
</outSequence>
XSLT 位于本地服务中,并已使用 PHP 在 .xsl 文件中单独进行了测试。我明白了……
15:14:43,508 [-] [PassThroughMessageProcessor-2] 信息至: http://www.w3.org/2005/08/addressing/anonymous,WSAction:, SOAPAction: , 消息 ID: 瓮:uuid:4e28dd11-6720-4f40-9714-6fa7ebd5630f,方向:响应, MESSAGE = 执行默认的“故障”序列,ERROR_CODE = 0, ERROR_MESSAGE = 无法使用:值执行 XSLT 转换 {name ='null', keyValue ='out_transform2'} 针对源 XPath : s11:Body/child::[位置()=1] | s12:Body/child::[position()=1] 原因:使用以下方法创建 XSLT 转换器时出错:Value {name ='null', keyValue ='out_transform2'},信封:
<?xml version='1.0'
encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><users
xmlns="http://test.org"><users><user_id>1745</user_id><fname>john</fname>
<lname>smith</lname></users><users><user_id>7461</user_id><fname>Happy</fname>
...
<lname>claus</lname></users></users></soapenv:Body></soapenv:Envelope>
...在中介消息跟踪器中。 我的 XSLT 是一个内联 XML 条目
<localEntry xmlns="http://ws.apache.org/ns/synapse" key="out_transform2">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="utf-8" indent="yes"/>
<!-- snipped content out here !-->
</xsl:stylesheet>
</localEntry>
有什么想法吗?
【问题讨论】: