You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Udo Einspanier <u....@conterra.de> on 2014/07/31 10:06:25 UTC

XSLT component produces different result after logging a CXF PAYLOAD request

Hi,

I have this in my Camel config file:

        <route>
            <from uri="cxf:bean:cswSoapEndpoint?dataFormat=PAYLOAD"/>
            <to uri="log:input"/>
            <to uri="xslt:productRequest1.xsl"/>

Sending a SOAP request to the CXF endpoint with PAYLOAD dataFormat and applying the XSLT work as expected with this configuration. However, when I remove the log component, the result of my XSLT file is different. In particular this template creates an empty element, while it correctly writes the namespace URI when the request is logged before it goes to the XSLT component:

	<xsl:template name="parseNsUri">
		<xsl:param name="prefix"/>
		<xsl:element name="uapi:nsUri">
			<xsl:value-of select="namespace::*[name() = $prefix]"/>
		</xsl:element>
	</xsl:template>

Is the XML parsed with different namespace aware settings when it is logged before going to the XSLT component? What can I do to get a namespace aware transformation, without logging the request?
I'm using Camel 2.13.0 with Tomcat 6 / Java7.

Regards,
Udo

RE: XSLT component produces different result after logging a CXF PAYLOAD request

Posted by Udo Einspanier <u....@conterra.de>.
Hi Claus,

thanks a lot for the quick response. But I don't think this is the problem. The message is not empty, it is the same in both cases, apart from the missing namespace URIs in the XML that was not logged.

Best regards,
Udo

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Donnerstag, 31. Juli 2014 10:08
To: users@camel.apache.org
Subject: Re: XSLT component produces different result after logging a CXF PAYLOAD request

Hi

Sounds a bit like this
http://camel.apache.org/why-is-my-message-body-empty.html

On Thu, Jul 31, 2014 at 10:06 AM, Udo Einspanier <u....@conterra.de> wrote:
> Hi,
>
> I have this in my Camel config file:
>
>         <route>
>             <from uri="cxf:bean:cswSoapEndpoint?dataFormat=PAYLOAD"/>
>             <to uri="log:input"/>
>             <to uri="xslt:productRequest1.xsl"/>
>
> Sending a SOAP request to the CXF endpoint with PAYLOAD dataFormat and applying the XSLT work as expected with this configuration. However, when I remove the log component, the result of my XSLT file is different. In particular this template creates an empty element, while it correctly writes the namespace URI when the request is logged before it goes to the XSLT component:
>
>         <xsl:template name="parseNsUri">
>                 <xsl:param name="prefix"/>
>                 <xsl:element name="uapi:nsUri">
>                         <xsl:value-of select="namespace::*[name() = $prefix]"/>
>                 </xsl:element>
>         </xsl:template>
>
> Is the XML parsed with different namespace aware settings when it is logged before going to the XSLT component? What can I do to get a namespace aware transformation, without logging the request?
> I'm using Camel 2.13.0 with Tomcat 6 / Java7.
>
> Regards,
> Udo



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: XSLT component produces different result after logging a CXF PAYLOAD request

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Sounds a bit like this
http://camel.apache.org/why-is-my-message-body-empty.html

On Thu, Jul 31, 2014 at 10:06 AM, Udo Einspanier
<u....@conterra.de> wrote:
> Hi,
>
> I have this in my Camel config file:
>
>         <route>
>             <from uri="cxf:bean:cswSoapEndpoint?dataFormat=PAYLOAD"/>
>             <to uri="log:input"/>
>             <to uri="xslt:productRequest1.xsl"/>
>
> Sending a SOAP request to the CXF endpoint with PAYLOAD dataFormat and applying the XSLT work as expected with this configuration. However, when I remove the log component, the result of my XSLT file is different. In particular this template creates an empty element, while it correctly writes the namespace URI when the request is logged before it goes to the XSLT component:
>
>         <xsl:template name="parseNsUri">
>                 <xsl:param name="prefix"/>
>                 <xsl:element name="uapi:nsUri">
>                         <xsl:value-of select="namespace::*[name() = $prefix]"/>
>                 </xsl:element>
>         </xsl:template>
>
> Is the XML parsed with different namespace aware settings when it is logged before going to the XSLT component? What can I do to get a namespace aware transformation, without logging the request?
> I'm using Camel 2.13.0 with Tomcat 6 / Java7.
>
> Regards,
> Udo



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/