As your service class uses the Provider API, you can get the soap message body with POJO data format. I don’t suggest you use the PAYLOAD data format this time.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On December 6, 2013 at 4:28:26 AM, krzysztof (k.wilas...@gmail.com) wrote: > >Hi, > >I have problem with camel cxf in payload mode. CxfPayload object does not >contain SOAP body element. I am using camel 2.11.0. > >I have defined cxf endpoint like this - > >>address="/Address" >wsdlURL="wsdl/WSDL.wsdl" >serviceClass="ServiceClass" >serviceName="a:ServiceName" >endpointName="a:EndpointName" >xmlns:a="https://a.org/ws" >loggingFeatureEnabled="true"> > > > > > >My ServiceClass is like this: > >@WebServiceProvider(serviceName = "ServiceName") >@ServiceMode(Service.Mode.PAYLOAD) >public interface ServiceClass extends Provider { > >@Override >Source invoke(Source source); >} > >I have camel route with following fragment: > >from("cxf:bean:cxfEndpoint").to(processor) > >I am sending soap message like: > > >> >> > > >> > > > >I have noticed that my requests are processed by various interceptors. One >of them is DocLiteralInInterceptor. It adds element from my soap >body(ns3:BodyElement) to MessageContentsList executing instruction - > >parameters.add(o); > >Later it is set as message content. > >Next interceptor is SoapHeaderInterceptor. It takes message content created >in previous interceptor(DocLiteralInInterceptor) and after some processing >adds ns1:Header1 to MessageContentList executing instruction - > >parameters.put(mpi, object); > >It replaces my body element from previous interceptor with header. When my >message arrives to the processor CxfPayload object does not contain body >element. > >What am I doing wrong? > >Thank you > > > >-- >View this message in context: >http://camel.465427.n5.nabble.com/Camel-CXF-in-payload-mode-received-message-does-not-contain-body-element-tp5744375.html >Sent from the Camel - Users mailing list archive at Nabble.com. >