camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Tam <>
Subject Re: Camel CXF generic producer before 2.8.0
Date Sun, 02 Oct 2011 14:54:31 GMT

If you do not specify both service class and WSDL in the endpoint, the 
validation is bypassed.  (The "skipPayloadMessagePartCheck" flag is not 
a user settable option).  You can send any XML payload you wish.  
Otherwise, message will be checked to make sure required body parts are 
provided for making the invocation according to WSDL or service class' 
specifications.   There is also a "wrappedStyle" option you can set and 
have effect on the format of the message.  If your message payload needs 
to be arbitrary, I am not sure why WSDL or service class should be 
specified.  I am also not sure why ws-addressing would make the payload 
arbitrary but I don't know.


On 10/02/2011 08:01 AM, Andrei Shakirin wrote:
> Hi Claus,
> Yep, it is possible way.
> Another possibility is using java CXF client with dispatch interface and integrate it
with my route via bean component.
> Do you have any ideas why Camel CXF code makes this validation at all? Basically root
payload element can be not the same as web service method name. It is required only for wrapped
style, but in case of using ws-addressing they can be different.
> Regards,
> Andrei.
> -----Original Message-----
> From: Claus Ibsen []
> Sent: 02 October 2011 09:36
> To:
> Subject: Re: Camel CXF generic producer before 2.8.0
> Hi
> You can use plain HTTP component to forward a web service call.
> On Fri, Sep 30, 2011 at 5:54 PM, Andrei Shakirin<>  wrote:
>> Hi,
>> Is there any way to avoid expected message part checking ( in 2.7.3?
>> skipPayloadMessagePartCheck option was introduced in 2.8.0:
>> Anyway, just it means that there is no way to implement universal CXF producer in
Camel before 2.8.0 (analog to CXF Dispatch interface)?
>> The use case is following: I need generic Camel CXF producer, that can speak with
any external web service.
>> I defined a generic interface:
>> @WebServiceProvider()
>> @ServiceMode(value = Service.Mode.PAYLOAD) public interface
>> WebServiceFacade extends Provider<Source>  {
>>     public StreamSource invoke(Source message); }
>> and specify route:
>> <camelContext xmlns="">
>>   <camel:route>
>>    <camel:from
>> uri="cxf://http://localhost:8197/FlightReservationService/?dataFormat=
>> PAYLOAD&amp;serviceClass=de.camel.test.WebServiceFacadeClass"/>
>>    <camel:to uri="log:TestLogger"/>
>>    <camel:to
>> uri="cxf://http://localhost:8080/sbb/services/Invoke?dataFormat=PAYLOA
>> D&amp;serviceClass=de.camel.test.WebServiceFacade "/>  </camel:route>
>> </camelContext>
>> Camel successfully receives incoming message and logs it. After it, before sending,
 Camel tries to compare message parts from the incoming message with MessagePartInfo from
the WebServiceFacade interface. Of course they have different names : {}invoke
from interface and {xxxx}yyy from message.
>> Therefore Camel throws exception: The PayLoad elements cannot fit with the message
parts of the BindingOperation. Please check the BindingOperation and PayLoadMessage.
>> Questions:
>> 1) what is the reason of this validation? Basically root payload element can be not
the same as web service method name (it is required only for wrapped style, but in case of
using ws-addressing they can be different).
>> 2) is there any other possibility to provide universal CXF producer in Camel before
skipPayloadMessagePartCheck was introduced (analog to CXF Dispatch interface)?
>> Regards,
>> Andrei.
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email:
> Web:
> Twitter: davsclaus, fusenews
> Blog:
> Author of Camel in Action:

View raw message