You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sram <sr...@hotmail.com> on 2012/01/24 16:25:11 UTC

the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

With the help of this forum I was able to overcome my previous issue related
to external webservice invocation. However, as a continuation to the same
problem when a successful response is returned by this external endpoint, I
encounter this error in my camel context.

I try to Message out = exchange.getOut(); but body is null. Should i not get
my response in OUT of bean:myOutProcessor ? When I directly invoke this
service without camel route, I can get a response for the same payload. Any
pointers to resolve is highly appreciated.


<camelContext trace="true" xmlns="http://camel.apache.org/schema/spring">
	
		<route>
			<from uri="cxf:bean:myService" />
			<setExchangePattern pattern="InOut"/>			
		 	<to uri="bean:myDelegate" />		 			
	 	<to
uri="http://d026ats002268:19080/testServiceClientsWAR/services/myService?throwExceptionOnFailure=false;bridgeEndpoint=true"/>					
			<to uri="bean:myOutProcessor"/>			
		</route>
	</camelContext>


=============  Exception ============
0 PhaseIntercep W org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging Interceptor for
{http://services.reporting.mycomp.com/reporting/services}ReportService has
thrown exception, unwinding now
                                 org.apache.cxf.binding.soap.SoapFault:
"http://services.reporting.mycomp.com/reporting/services", the namespace on
the "IReportServiceExecuteRequest" element, is not a valid SOAP version.
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:115)
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
	at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
	at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
	at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
	at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
	at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
	at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
	at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
	at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
	at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
	at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)

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

Re: the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

Posted by sunita <su...@ge.com>.
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.

Re: the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

Posted by Willem jiang <wi...@gmail.com>.
Where did you call the exchange.getOut() ?


--  
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 2:00 AM, sunita wrote:

> Hello,
>  
> I am facing same issue. I get the same error - namespace is not a valid SOAP
> version.
>  
> I added exchange.hasOut() before calling exchange.getOut().
>  
> hasOut returned true but getOut returned null headers and body
>  
> Were you able to resolve the issue.
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/the-namespace-on-the-IReportServiceExecuteRequest-element-is-not-a-valid-SOAP-version-tp5284067p5733738.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>  




Re: the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

Posted by sunita <su...@ge.com>.
Hello,

I am facing same issue. I get the same error - namespace is not a valid SOAP
version.

I added exchange.hasOut() before calling exchange.getOut().

hasOut returned true but getOut returned null headers and body

Were you able to resolve the issue.



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

Re: the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

Posted by sram <sr...@hotmail.com>.
True, but I do not understand why "out" is empty, whereas the same external
endpoint when hit directly fetches response.

---------
Expected from direct invocation outside camel route:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns8:IReportServiceExecuteResponse
xmlns="http://services.reporting.mycomp.com/2011/10/outputs"
xmlns:ns8="http://services.reporting.mycomp.com/reporting/services">
            <SystemResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ReportDocumentResponse">
                <ResponseDocument>TEst document</ResponseDocument>
            </SystemResponse>
        </ns8:IReportServiceExecuteResponse>
    </soap:Body>
</soap:Envelope>

------------
Received from tracer:

Body:<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://services.reporting.mycomp.com/reporting/services",
the namespace on the "IReportServiceExecuteRequest" element, is not a valid
SOAP version.</faultstring></soap:Fault></soap:Body>

More details of this exception is in previous thread

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

Re: the namespace on the "IReportServiceExecuteRequest" element, is not a valid SOAP version

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this FAQ about getIn vs getOut
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Basically check with hasOut() before calling getOut().

On Tue, Jan 24, 2012 at 4:25 PM, sram <sr...@hotmail.com> wrote:
> With the help of this forum I was able to overcome my previous issue related
> to external webservice invocation. However, as a continuation to the same
> problem when a successful response is returned by this external endpoint, I
> encounter this error in my camel context.
>
> I try to Message out = exchange.getOut(); but body is null. Should i not get
> my response in OUT of bean:myOutProcessor ? When I directly invoke this
> service without camel route, I can get a response for the same payload. Any
> pointers to resolve is highly appreciated.
>
>
> <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring">
>
>                <route>
>                        <from uri="cxf:bean:myService" />
>                        <setExchangePattern pattern="InOut"/>
>                        <to uri="bean:myDelegate" />
>                <to
> uri="http://d026ats002268:19080/testServiceClientsWAR/services/myService?throwExceptionOnFailure=false;bridgeEndpoint=true"/>
>                        <to uri="bean:myOutProcessor"/>
>                </route>
>        </camelContext>
>
>
> =============  Exception ============
> 0 PhaseIntercep W org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging Interceptor for
> {http://services.reporting.mycomp.com/reporting/services}ReportService has
> thrown exception, unwinding now
>                                 org.apache.cxf.binding.soap.SoapFault:
> "http://services.reporting.mycomp.com/reporting/services", the namespace on
> the "IReportServiceExecuteRequest" element, is not a valid SOAP version.
>        at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:115)
>        at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)
>        at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>        at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
>        at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
>        at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
>        at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
>        at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
>        at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
>        at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>        at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
>        at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
>        at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
>        at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
>        at
> com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
>        at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
>        at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
>        at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
>        at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
>        at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
>        at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
>        at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270)
>        at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
>        at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
>        at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>        at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>        at
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
>        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
>        at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
>        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
>        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/the-namespace-on-the-IReportServiceExecuteRequest-element-is-not-a-valid-SOAP-version-tp5284067p5284067.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/