Hi,  
Please don't send the same question into two different users mailing list.
I already answer you question in the cxf users mailing list.

The answer is you the response should be wrapped with soap envelope.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, June 4, 2013 at 4:05 AM, Monga, Sunita (GE Healthcare) wrote:

> Hello all,
>  
> I have a route which sends a request to CXF webservice using Payload 
> dataformat. My question should the response consist of only Soap:body or 
> should it be the entire message soap:envelope
>  
> Spring context
>  
> <cxf:cxfEndpoint id="xdrReceiverEndpoint"
> address="${xdrWebserviceUrl}"
> endpointName="s:CcdaXdrServicePort"
> serviceName="s:CcdaXdrService"
> xmlns:s="http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com";>
> <cxf:properties>
> <entry key="mtom-enabled" value="true"/>
> <entry key="dataFormat" value="PAYLOAD"/>
> <entry key="loggingFeatureEnabled" value="true"/>
> <!-- <entry key="defaultOperationName" value="submitCcda"/>-->
> </cxf:properties>
> </cxf:cxfEndpoint>
>  
> Sample request:
>  
> static final String REQ_MESSAGE="<ccdaRequest xmlns=\"" 
> +"http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService\";>"
> +"<clinicalDocument>"
> +"<ccDocument>"
> +"<xop:Include xmlns:xop=\"http://www.w3.org/2004/08/xop/include\"";
> + " href=\"cid:" + REQ_DOC_CID + "\"/>"
> +"</ccDocument>"
> +"</clinicalDocument>"
> +"</ccdaRequest>";
>  
>  
> I am trying to use SoapUI mockservice to mock the response as below
>  
>  
> <ccdaResponse 
> xmlns="http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService";>
> <!--Optional:-->
> <ccdaAcknowledgement>
> <!--Optional:-->
> <statusCode>0</statusCode>
> <!--Optional:-->
> <statusDesc>Success</statusDesc>
> </ccdaAcknowledgement>
> </ccdaResponse>
>  
> But I get following error
>  
> [http-bio-8080-exec-1] WARN org.apache.cxf.phase.PhaseInterceptorChain - 
> Interceptor for 
> {http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com}CcdaXdrService#{http://camel.apache.org/cxf/jaxws/dispatch}Invoke
>  has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: 
> "http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com/CcdaXdrService";, 
> the namespace on the "ccdaResponse" element, is not a valid SOAP version.
> at 
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:116)
> at 
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:142)
> at 
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:61)
>  
> If the response is the entire soap envelope I get following error. So not 
> sure what the response should like
>  
>  
> org.apache.cxf.interceptor.Fault: Unexpected element 
> {http://model.webservices.ihe.adapters.ccg.dataexchange.hcit.ge.com/CcdaXdrService}ccdaResponse
>  found. Expected {http://camel.apache.org/cxf/jaxws/dispatch}InvokeResponse.
>  
>  
>  
> at 
> org.apache.cxf.interceptor.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:258)
>  
>  
>  
> at 
> org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:200)
>   


Reply via email to