【问题标题】:XSLT transformation in out sequence for an ESB 4.7.0 service wont execute无法执行 ESB 4.7.0 服务的 XSLT 转换
【发布时间】: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>

有什么想法吗?

【问题讨论】:

    标签: xml xslt wso2esb


    【解决方案1】:

    当 WSO2 找不到或无法加载您的 XSLT 时,您会看到此错误。

    在您的情况下,我可以看到用于命名您的本地条目并在 XSLT 中介配置中引用它的相同字符串“out_transform2”:它似乎是正确的。

    我猜 WSO2 可以找到,但无法加载您的 XSL,因为本地条目内部存在问题:您应该使用 XML 编辑器编辑文件系统上的文件 out_transform2.xml 并验证它。

    【讨论】:

    • 我已经将我的 XSL 作为一个单独的文件进行了测试,它工作正常。我从“试试看”得到的错误是.. wso2.org/ns/TryitProxy">org.apache.axis2.AxisFault: Read timed out
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-29
    • 1970-01-01
    相关资源
    最近更新 更多