Hi all,

I have some question about camel-cxf component.
I use cxf component in a spring configuration file like that

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint";
        xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://activemq.apache.org/camel/schema/cxfEndpoint
       http://activemq.apache.org/camel/schema/cxfEndpoint/camel-cxf.xsd
       http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd ">

        

<!-- Consumer   -->
                <cxf:cxfEndpoint id="endpointConsumer"
                address="http://localhost:9001/client/MyService";
                wsdlURL="wsdl/myWsdl.wsdl" endpointName="s:MyEndpoint"
                serviceName="s:GererMarchesSoapService"
                xmlns:s="urn:mynamespace/service">
                
                <cxf:properties>
                 <entry key="dataFormat" value="MESSAGE"></entry>
                <!--<entry key="dataFormat" value="PAYLOAD"></entry>-->
                </cxf:properties>
                
                </cxf:cxfEndpoint>


        <!-- Provider -->

        <cxf:cxfEndpoint id="endpointProvider"
                serviceClass=" mynamespace.service.MyService"
                address="http://localhost:9000/services/MyService "
        wsdlURL="wsdl/myWsdl.wsdl" endpointName="s:GestionMarches"
                serviceName="s:GererMarchesSoapService"
                xmlns:s=" mynamespace/service ">
                <cxf:properties>
                         <entry key="dataFormat" value="MESSAGE"></entry>
                        <!--<entry key="dataFormat" value="PAYLOAD"></entry>-->
                </cxf:properties>
        </cxf:cxfEndpoint>

        

        <bean id="enrichProcessor" class="businessLogic.EnrichProcessor" />
        <camelContext id="camel-context"
                xmlns="http://activemq.apache.org/camel/schema/spring";>
                <route>
                        <from uri="cxf:bean:endpointConsumer" />  
                        <process ref="enrichProcessor" />
                        <to uri="cxf:bean:endpointProvider" />
                </route>
        </camelContext>
</beans>
 
The problem appears in my processor "enrichProcessor".
When I use "MESSAGE" as dataFormat, I can convert the body of the "IN
Message" into a String object and later (after conversion as StreamSource…)
parse it with an xsl stylesheet.
But, when I use "PAYLOAD" as dataFormat, this conversion (into String
object) is impossible :confused:.

Is someone can explain me the difference?
Thanks in advance.

-- 
View this message in context: 
http://www.nabble.com/How-to-parse-in-message-body-when-dataFormat-is-PAYLOAD---tp19798931s22882p19798931.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to