Yes, I have seen this example. My problem with this approach is that it is written to handle one pre-set hard coded method and it is all manually written code to handle the requests/responses instead of simply relying on the standard CXF inteface(with annotations)/implementations. This means my service that has 50 methods or so would be a lot of work using this approach. Do you agree or am I missing something?

Thanks....

On 5/9/2011 2:11 PM, Willem Jiang wrote:
Hi

If you are using the POJO dataformat, you don't need ot use the SoapJaxbDataFormat, as the camel-cxf endpoint will marshal and unmarsha the data for you.

You can find some example about how to use POJO dataformat here.

[1]http://camel.apache.org/cxf.html#CXF-HowtoconsumeamessagefromacamelcxfendpointinPOJOdataformat


On 5/10/11 2:42 PM, Chris Richmond wrote:

String WEB_SERVICES_URL =
"cxf://http://myhost:9999/MyServiceName?dataFormat=POJO&serviceName=
<http://myhost:9999/MyServiceName?dataFormat=POJO&serviceName=>{http://my.name.space}MyServiceName&serviceClass=my.service.MyServiceInterface";;


   SoapJaxbDataFormat soapDF = new
SoapJaxbDataFormat("my.service.MyServiceInterface", new
ServiceInterfaceStrategy(MyServiceInterface.class, false));

MyServiceInterface serverBean = new MyServiceInterfaceImpl();

         from(WEB_SERVICES_URL)
           .onException(Exception.class)
           .handled(true)
           .marshal(soapDF)
           .end()
           .unmarshal(soapDF)
           .bean(serverBean)
           .marshal(soapDF);

MyServiceInterface is my JAX-WS annotated service defintion
and MyServiceInterfaceImpl is the implementation obviously.



Reply via email to