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.


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com

Reply via email to