camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shultz, Dmitry" <Dmitry_Shu...@kaltire.com>
Subject RE: SOAP Envelope and headers are not added by CXF by default
Date Tue, 21 Jun 2016 22:47:22 GMT
It worked, Thanks!

-----Original Message-----
From: Aki Yoshida [mailto:elakito@gmail.com] 
Sent: June-21-16 4:37 AM
To: users@camel.apache.org
Subject: Re: SOAP Envelope and headers are not added by CXF by default

dataFormat=MESSAGE assumes the body content represents the entire soap message.
If you are sending the plain payload to the endpoint, you have to use use dataFormat=PAYLOAD
so that it will be wrapped in the soap envelope.

2016-06-21 2:52 GMT+02:00 Shultz, Dmitry <Dmitry_Shultz@kaltire.com>:
> Hi All,
>
> I have a route configured like this:
>
> public void configure() throws Exception {
>
>         String cxfUri = String.format("cxf://%s/?dataFormat=MESSAGE&username=%s&password=%s&loggingFeatureEnabled=true",
>                 url, user, password);
>         CxfEndpoint myCxfEp = (CxfEndpoint) getContext().getEndpoint(cxfUri);
>         myCxfEp.setServiceClass(org.tem.SomeService.class);
>
>         from("direct:service1")
>                 .to(cxfUri)
> }
>
> When I put request object in the body and send it to "direct:service1" It is marshaled
 to xml correctly and sent, but for some reason it doesn't wrap it with SOAP envelope and
headers (the http payload has only the request xml). Is there anything special supposed to
be done in order to make sure outgoing message has the proper soap format?
>
> Cheers,
> Dmitry
Mime
View raw message