Hi

You can use plain HTTP component to forward a web service call.


On Fri, Sep 30, 2011 at 5:54 PM, Andrei Shakirin <[email protected]> wrote:
> Hi,
>
> Is there any way to avoid expected message part checking (CxfEndpoint.java) 
> in 2.7.3?
> skipPayloadMessagePartCheck option was introduced in 2.8.0: 
> https://issues.apache.org/jira/browse/CAMEL-3778
>
> 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="http://camel.apache.org/schema/spring";>
>  <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 : {http://test.camel.de/}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: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to