Results 1 to 4 of 4

Thread: Marshalling with XmlBeanMarshaller and remove the XML binding information

  1. #1
    Join Date
    Sep 2007
    Posts
    5

    Default Marshalling with XmlBeanMarshaller and remove the XML binding information

    Hi,
    I'm using the XmlBeanMarshaller and I'm receiving this:
    <web:messageRequest mlns:web="http://www.myspacecom/services/webservices">
    <messageRequest>
    <data1>AAAAAAAAAAAAA</data1>
    <data2>CO</data2>
    <data3>CC</data3>
    <data4>00000000000094520170</data4>
    </messageRequest>
    </web:messageRequest>

    I would like to remove the binding information.

    How can I do that?

    Thanks in advance.

  2. #2
    Join Date
    Sep 2007
    Posts
    5

    Default

    Ok, I've found a solution and it was very easy. I've just created an interceptor.

  3. #3
    Join Date
    Nov 2007
    Posts
    4

    Default

    Can you post the piece of code for the interceptor and its configuration details

    Thanks

  4. #4
    Join Date
    Sep 2007
    Posts
    5

    Default

    Sure, I used a bean similar to this in the config file:
    <code>
    <bean id="transformingInterceptor"
    class="org.springframework.ws.server.endpoint.inte rceptor.PayloadTransformingInterceptor">
    <property name="requestXslt" value="/WEB-INF/oldRequests.xslt"/>
    </bean>

    and the oldRequest.xslt is something like this.

    oldRequest.xslt
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="2.0">
    <xslaram name="context"/>
    <xsl:output method="xml"/>

    <xsl:template match="/child::*[1]">
    <xsl:copy-of select="@*|node()" />
    </xsl:template>

    </xsl:stylesheet>
    </code>
    Regards,

    Torimpo
    Last edited by torimpo; Aug 8th, 2009 at 10:09 AM.

Posting Permissions

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