Here is my code:

                        Exchange exchange =
template.send("cxf:bean:xdrReceiverEndpoint?synchronous=true&exchangePattern=InOut",
new Processor() {
                                public void process(final Exchange exchange) 
throws
Exception {
                            List<Source> elements = new ArrayList<Source>();    
                            elements.add(new DOMSource(DOMUtils.readXml(new
StringReader(REQ_MESSAGE)).getDocumentElement()));
                              CxfPayload<SoapHeader> body = new
CxfPayload<SoapHeader>(new ArrayList<SoapHeader>(),
                                                elements, null);
                              logger.debug("constructed cxfpayload body, 
"+body);
                              exchange.getIn().setBody(body);
                              logger.debug("set body in exchange");
                              exchange.getIn().addAttachment(REQ_DOC_CID, 
                                                new DataHandler(new
ByteArrayDataSource(docContent, "UTF-8")));
                            logger.debug("added attachment to exchange");
                       
//exchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,
"http://service.webservices.xdrreceiverimpl.pil.hcit.ge.com";);                  
                  
                          // 
exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "submitCcda");
                       // logger.debug("added header");
                                }
                        }
                        );
                        logger.debug("made the call to cxf endpoint");
                        logger.debug("has out="+exchange.hasOut());
                        org.apache.camel.Message response = exchange.getOut();
                        logger.debug("received the response back, now decode 
it");
                        logger.debug("response = "+response);
                        String value =
decodeResponseFromPayload((CxfPayload<?>)response.getBody(CxfPayload.class),
exchange);
                        logger.debug("value = "+value);

body is null in the response so it fails in decodeResponseFromPayload method

logs say:

2013-06-04 09:08:05 DEBUG  "constructed cxfpayload body,
org.apache.camel.component.cxf.CxfPayload headers: []body: [ [<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:cedoc"/></ccDocument></clinicalDocument></ccdaRequest>]]"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:05 DEBUG  "set body in exchange"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:05 DEBUG  "added attachment to exchange"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "made the call to cxf endpoint"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "has out=true"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "received the response back, now decode it"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "Creating instance of bean
'org.apache.camel.converter.jaxp.DomConverter'"
[org.springframework.beans.factory.support.DefaultListableBeanFactory]
2013-06-04 09:08:06 DEBUG  "Finished creating instance of bean
'org.apache.camel.converter.jaxp.DomConverter'"
[org.springframework.beans.factory.support.DefaultListableBeanFactory]
2013-06-04 09:08:06 DEBUG  "response = Message:
org.apache.camel.component.cxf.CxfPayload headers: []body: null"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "in decodeResponseFromPayload"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 DEBUG  "payload =
org.apache.camel.component.cxf.CxfPayload headers: []body: null"
[com.ge.hcit.pil.xdrreceiverimpl.utils.XDRResponseHelper]
2013-06-04 09:08:06 INFO   "Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@3956267d:
startup date [Tue Jun 04 09:08:06 CDT 2013]; root of 



--
View this message in context: 
http://camel.465427.n5.nabble.com/the-namespace-on-the-IReportServiceExecuteRequest-element-is-not-a-valid-SOAP-version-tp5284067p5733801.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to