failed to transform output from java to xml/soap


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 {}Body of type {}Body, found <a:Response> (in namespace, but next item should be any of [{}Fault, {}Response]

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

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

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


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?