【发布时间】:2017-12-26 04:44:52
【问题描述】:
Web 服务使用者在使用转换器消息时正在返回值。但是当我使用 xslt 组件时它不起作用。它返回 null。
这是我的流程。
Http->字节数组转字符串->xslt->webservice消费者。
谁能帮帮我?
这是我的意见
<?xml version="1.0" encoding="UTF-8"?>
<PayLoad>
<RoutingHeader>
<SourceID>1234</SourceID>
<SourceName>ISGN</SourceName>
<SourceRefNum>167309</SourceRefNum>
<SourceRoutingRef />
<DestinationID>999</DestinationID>
<DestinationRefNum />
<DestinationRoutingRef />
<TransDate>2017-04-17T09:04:24.702000-04:00</TransDate>
</RoutingHeader>
<PayLoad>
我正在使用 xslt 组件将此 xml 转换为肥皂
这是我的 xsl xode
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="URI_SOAP_WS">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:header/>
<soap:Body>
<xsl:apply-templates/>
</soap:Body>
</soap:Envelope>
</xsl:template>
<xsl:template match="*">
<xsl:element name="s:{local-name()}" namespace="http://spring.io/guides/s-
producing-web-service">
<xsl:apply-templates select="node()|@*" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
当我将此soap文件发送到webservice消费者组件时,得到null
【问题讨论】:
-
请添加您的输入和 xsl 代码 - 它会更容易为您提供帮助。
-
我已经添加了我的输入文件和 xsl 文件。你能帮帮我吗?
标签: xml web-services xslt soap mule