Results 1 to 2 of 2

Thread: Strange Behavior in PayloadTransformingInterceptor

  1. #1
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    1

    Default Strange Behavior in PayloadTransformingInterceptor

    Hi,

    I'm attempting to use the PayloadTransformingInterceptor to transform only the reponse from an endpoint by wrapping it with a "standard" response element, but the resulting response is not what I expected.

    As an example, my endpoint is returning the following which will be transformed:

    Code:
    <element>Hello World!</element>
    My XSL Stylesheet looks like this:

    Code:
    <?xml version="1.0"?>
    
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
        <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    
        <xsl:template match="/">
            <Response>
                <xsl:apply-templates/>
            </Response>
        </xsl:template>
    
        <xsl:template match="@*|node()">
            <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
        </xsl:template>
    
    </xsl:stylesheet>
    The expected response is this (seen when transforming it through Ant):

    Code:
    <?xml version="1.0" encoding="UTF-8"?><Response>
    <element>Hello World!</element>
    </Response>
    But I'm getting this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?><Response><Response><Response></Response></Response></Response>
    Any suggestions??? Thanks.

    Kevin

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    I think your XSLT is incorrect. I am not an XSLT expert, so I can't tell you what's wrong with it, but you can try and look at http://www.w3schools.com/xsl/default.asp
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •