You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "rrino Gazeta.pl" <rr...@gazeta.pl> on 2011/07/18 13:49:43 UTC
how to send string as a soap message to jbi endpoint
Hi
I have a question regarding sending soap message as a String to jbi.endpoint
(cxf-bc concumer):
with the following
from("timer://tutorial?fixedRate=true&delay=4000&period=10000")
.setBody(constant(msg))
.to("jbi:endpoint:
http://servicecom/ws/WebService/cxfbc-provider-endpoint?operation={http://package.com/ws}doSomething&mep=in-out
")
.to("log:log");
i'm getting
Caused by: java.lang.Exception: Message wrapper element is '{
http://schemas.xmlsoap.org/soap/envelope/}Envelope' but expected '{
http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
the 'msg' is valid soap string, should I convert this msg to other object ?
Or should I do something else ?
Apache camel 2.7
regards
rafal
Re: how to send string as a soap message to jbi endpoint
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
you should transform the message into a JBI message. Basically, a JBI
message is more or less a SOAP envelope (payload) with headers (jbi).
Regards
JB
On 07/18/2011 01:49 PM, rrino Gazeta.pl wrote:
> Hi
>
> I have a question regarding sending soap message as a String to jbi.endpoint
> (cxf-bc concumer):
>
>
> with the following
>
> from("timer://tutorial?fixedRate=true&delay=4000&period=10000")
> .setBody(constant(msg))
> .to("jbi:endpoint:
> http://servicecom/ws/WebService/cxfbc-provider-endpoint?operation={http://package.com/ws}doSomething&mep=in-out
> ")
> .to("log:log");
>
>
> i'm getting
>
> Caused by: java.lang.Exception: Message wrapper element is '{
> http://schemas.xmlsoap.org/soap/envelope/}Envelope' but expected '{
> http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
>
> the 'msg' is valid soap string, should I convert this msg to other object ?
> Or should I do something else ?
>
>
> Apache camel 2.7
>
>
> regards
>
> rafal
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: how to send string as a soap message to jbi endpoint
Posted by "rrino Gazeta.pl" <rr...@gazeta.pl>.
Of course - provider :)
And with useJBIWrapper="false" and useSOAPEnvelope="true" it works fine,
thanks a lot!
regards
rafal
2011/7/18 Freeman Fang <fr...@gmail.com>
> Hi,
>
> my comment inline
>
> On 2011-7-18, at 下午7:49, rrino Gazeta.pl wrote:
>
> Hi
>>
>> I have a question regarding sending soap message as a String to
>> jbi.endpoint
>> (cxf-bc concumer):
>>
> I guess you mean cxf bc provider here, as to("jbi:endpoint:..) the target
> can't be a cxfbc consumer.
>
>
>>
>> with the following
>>
>> from("timer://tutorial?**fixedRate=true&delay=4000&**period=10000")
>> .setBody(constant(msg))
>> .to("jbi:endpoint:
>> http://servicecom/ws/**WebService/cxfbc-provider-**
>> endpoint?operation={http://**package.com/ws}doSomething&**mep=in-out<http://servicecom/ws/WebService/cxfbc-provider-endpoint?operation=%7Bhttp://package.com/ws%7DdoSomething&mep=in-out>
>> ")
>> .to("log:log");
>>
>>
>> i'm getting
>>
>> Caused by: java.lang.Exception: Message wrapper element is '{
>> http://schemas.xmlsoap.org/**soap/envelope/}Envelope<http://schemas.xmlsoap.org/soap/envelope/%7DEnvelope>'
>> but expected '{
>> http://java.sun.com/xml/ns/**jbi/wsdl-11-wrapper}message<http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper%7Dmessage>
>> '
>>
>> the 'msg' is valid soap string, should I convert this msg to other object
>> ?
>> Or should I do something else ?v
>>
> Try to add useJBIWrapper="false" and useSOAPEnvelope="true" to your cxf bc
> provider endpoint.
>
> Freeman
>
>
>>
>> Apache camel 2.7
>>
>>
>> regards
>>
>> rafal
>>
>
> ------------------------------**---------------
> Freeman Fang
>
> FuseSource
> Email:ffang@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.**com <http://freemanfang.blogspot.com>
>
>
>
>
>
>
>
>
>
>
Re: how to send string as a soap message to jbi endpoint
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
my comment inline
On 2011-7-18, at 下午7:49, rrino Gazeta.pl wrote:
> Hi
>
> I have a question regarding sending soap message as a String to
> jbi.endpoint
> (cxf-bc concumer):
I guess you mean cxf bc provider here, as to("jbi:endpoint:..) the
target can't be a cxfbc consumer.
>
>
> with the following
>
> from("timer://tutorial?fixedRate=true&delay=4000&period=10000")
> .setBody(constant(msg))
> .to("jbi:endpoint:
> http://servicecom/ws/WebService/cxfbc-provider-endpoint?operation={http://package.com/ws
> }doSomething&mep=in-out
> ")
> .to("log:log");
>
>
> i'm getting
>
> Caused by: java.lang.Exception: Message wrapper element is '{
> http://schemas.xmlsoap.org/soap/envelope/}Envelope' but expected '{
> http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message'
>
> the 'msg' is valid soap string, should I convert this msg to other
> object ?
> Or should I do something else ?
Try to add useJBIWrapper="false" and useSOAPEnvelope="true" to your
cxf bc provider endpoint.
Freeman
>
>
> Apache camel 2.7
>
>
> regards
>
> rafal
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com