You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "valerian.merkling" <va...@capgemini.com> on 2013/04/10 17:41:19 UTC
How to use a cxf consumer in camel
Hi !
I'm currently unable to win against this error : /The PayLoad elements
cannot fit with the message parts of the BindingOperation. Please check the
BindingOperation and PayLoadMessage/ which come with this warning :
/ Cannot set right payload parameters. Please check the BindingOperation and
PayLoadMessage./
As far as i read, it seems the message i'm trying to send isn't correct, but
i don't understand what is wrong.
Here is my route definition :
<cxf:cxfEndpoint id="esb-metier-ws"
address="http://10.10.10.10:9090/metierTest"
serviceClass="basemetier.silria.webservices.BaseMetier"
/>
< ... >
<route id="central-file-in">
<from uri="file:{{esb.central.in.folder}}?delete=true" />
<convertBodyTo type="java.lang.String"/>
<to uri="activemq:topic:central"/>
</route>
<route id="central-ws-out">
<from uri="activemq:topic:central"/>
<to uri="cxf:bean:esb-metier-ws?dataFormat=PAYLOAD"/>
</route>
My goal is to be able to send soap message to
http://10.10.10.10:9090/metierTest from multiple route.
For test purpose, i also have a producer route (loaded on a different
server) :
<route id="central-ws-test" streamCache="true">
<from uri="cxf:bean:esb-test-ws?dataFormat=PAYLOAD"/>
<log message="${in.body}"/>
<to uri="test-response-test"/>
</route>
With Soapui, i sent à few request, and my producer central-ws-test showed my
the payload was
<q0:CreerOuModifierCargaisons xmlns:q0="http://webservices.basemetier/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Cargaisons>
<NumCargaison>a</NumCargaison>
<CodeExpediteur>b</CodeExpediteur>
<CodeDestinataire>c</CodeDestinataire>
<DateDepartEstimee>d</DateDepartEstimee>
<DateArriveeEstimee>e</DateArriveeEstimee>
<ModeTransport>f</ModeTransport>
<NumVecteur>q</NumVecteur>
<Origine>f</Origine>
</Cargaisons>
</q0:CreerOuModifierCargaisons>
But if i use it as input this content as file, and send it with camel, i got
the error message.
I also tried the remove the namespace stuff, or use the /portName/ params to
specify wich operation i want to use, but i still have this error ...
Can someone help me ?
Regards,
Valerian Merkling
--
View this message in context: http://camel.465427.n5.nabble.com/How-to-use-a-cxf-consumer-in-camel-tp5730669.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to use a cxf consumer in camel
Posted by "valerian.merkling" <va...@capgemini.com>.
It's ok with the operationName, it works with this route :
<route id="central-ws-out">
<from uri="activemq:topic:central"/>
<setHeader headerName="operationName">
<constant>CreerOuModifierCargaisons</constant>
</setHeader>
<to uri="cxf:bean:esb-metier-ws?dataFormat=PAYLOAD"/>
</route>
and this message
<q0:CreerOuModifierCargaisons xmlns:q0="http://webservices.basemetier/">
<Cargaisons>
<NumCargaison>a</NumCargaison>
<...> ... </...>
<Origine>f</Origine>
</Cargaisons>
</q0:CreerOuModifierCargaisons>
Thanks !
--
View this message in context: http://camel.465427.n5.nabble.com/How-to-use-a-cxf-consumer-in-camel-tp5730669p5730899.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to use a cxf consumer in camel
Posted by Willem Jiang <wi...@gmail.com>.
Did you try to set the operationName header?
发自我的 iPhone
在 2013-4-10,下午11:41,"valerian.merkling" <va...@capgemini.com> 写道:
> Hi !
>
> I'm currently unable to win against this error : /The PayLoad elements
> cannot fit with the message parts of the BindingOperation. Please check the
> BindingOperation and PayLoadMessage/ which come with this warning :
> / Cannot set right payload parameters. Please check the BindingOperation and
> PayLoadMessage./
>
> As far as i read, it seems the message i'm trying to send isn't correct, but
> i don't understand what is wrong.
>
>
>
> Here is my route definition :
>
> <cxf:cxfEndpoint id="esb-metier-ws"
> address="http://10.10.10.10:9090/metierTest"
> serviceClass="basemetier.silria.webservices.BaseMetier"
> />
>
> < ... >
>
> <route id="central-file-in">
> <from uri="file:{{esb.central.in.folder}}?delete=true" />
> <convertBodyTo type="java.lang.String"/>
> <to uri="activemq:topic:central"/>
> </route>
>
> <route id="central-ws-out">
> <from uri="activemq:topic:central"/>
> <to uri="cxf:bean:esb-metier-ws?dataFormat=PAYLOAD"/>
> </route>
>
>
> My goal is to be able to send soap message to
> http://10.10.10.10:9090/metierTest from multiple route.
>
> For test purpose, i also have a producer route (loaded on a different
> server) :
>
> <route id="central-ws-test" streamCache="true">
> <from uri="cxf:bean:esb-test-ws?dataFormat=PAYLOAD"/>
> <log message="${in.body}"/>
> <to uri="test-response-test"/>
>
> </route>
>
> With Soapui, i sent à few request, and my producer central-ws-test showed my
> the payload was
>
>
> <q0:CreerOuModifierCargaisons xmlns:q0="http://webservices.basemetier/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <Cargaisons>
> <NumCargaison>a</NumCargaison>
> <CodeExpediteur>b</CodeExpediteur>
> <CodeDestinataire>c</CodeDestinataire>
> <DateDepartEstimee>d</DateDepartEstimee>
> <DateArriveeEstimee>e</DateArriveeEstimee>
> <ModeTransport>f</ModeTransport>
> <NumVecteur>q</NumVecteur>
> <Origine>f</Origine>
> </Cargaisons>
> </q0:CreerOuModifierCargaisons>
>
> But if i use it as input this content as file, and send it with camel, i got
> the error message.
>
> I also tried the remove the namespace stuff, or use the /portName/ params to
> specify wich operation i want to use, but i still have this error ...
>
> Can someone help me ?
>
> Regards,
>
> Valerian Merkling
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-use-a-cxf-consumer-in-camel-tp5730669.html
> Sent from the Camel - Users mailing list archive at Nabble.com.