camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Camel CXF generic producer before 2.8.0
Date Sun, 02 Oct 2011 07:36:15 GMT

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=PAYLOAD&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
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message