failed to transform output from java to xml/soap

Issue

This Content is from Stack Overflow. Question asked by Moon

Hi I am facing a problem when java give response and datapower need to transform the response to xml/soap it is failed to transform it. Does I’m missing something?
cvc-particle 3.1: in element {http://schemas.xmlsoap.org/soap/envelope/}Body of type {http://schemas.xmlsoap.org/soap/envelope/}Body, found <a:Response> (in namespace http://gateway.xxx.xxx.xx/ws/), but next item should be any of [{http://schemas.xmlsoap.org/soap/envelope/}Fault, {http://gateway.xxx.xxx.xx/}Response]

<xsl:output method="xml" omit-xml-declaration="yes"/>

<!-- copy all input -->
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
    </xsl:copy> 
</xsl:template>

<!-- find and update all element's prefix with the namespace -->
<xsl:template match="*[contains(namespace-uri(),'http://gateway.xxx.xxx.xx/ws/')]">
    <xsl:element name="ws:{local-name()}">
        <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
</xsl:template>



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?