camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonny Newald (JIRA)" <>
Subject [jira] Updated: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests
Date Wed, 11 Nov 2009 09:15:52 GMT


Jonny Newald updated CAMEL-2144:


Test procedure after starting camel context:

1. Send a "ping"-Message to http://localhost:8080/test/service (HTTP-POST, e.g. with soapUI-Tool):

<soapenv:Envelope xmlns:soapenv="" xmlns:ser="test/service">

You should get a response like this:

<soap:Envelope xmlns:soap="">
      <pong xmlns="test/service"/>

2. Open browser with URL http://localhost:8080/test/service (=HTTP-GET)

You'll get a server-fault with the message of the exception you can see with stacktrace in

org.apache.cxf.interceptor.Fault: org.apache.cxf.message.MessageContentsList cannot be cast
to org.w3c.dom.Node
        at org.apache.camel.component.cxf.CxfConsumer$1.invoke(
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$
        at java.util.concurrent.Executors$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(
        at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(
        at org.mortbay.jetty.handler.ContextHandler.handle(
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
        at org.mortbay.jetty.handler.HandlerWrapper.handle(
        at org.mortbay.jetty.Server.handle(
        at org.mortbay.jetty.HttpConnection.handleRequest(
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
        at org.mortbay.jetty.HttpParser.parseNext(
        at org.mortbay.jetty.HttpParser.parseAvailable(
        at org.mortbay.jetty.HttpConnection.handle(
        at org.mortbay.thread.QueuedThreadPool$
Caused by: java.lang.ClassCastException: org.apache.cxf.message.MessageContentsList cannot
be cast to org.w3c.dom.Node
        at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(
        at org.apache.camel.builder.xml.XPathBuilder.matches(
        at org.apache.camel.processor.FilterProcessor.process(
        at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(
        at org.apache.camel.processor.RedeliveryErrorHandler.process(
        at org.apache.camel.processor.DefaultErrorHandler.process(
        at org.apache.camel.processor.DefaultChannel.process(
        at org.apache.camel.processor.UnitOfWorkProcessor.processNext(
        at org.apache.camel.processor.DelegateProcessor.process(
        at org.apache.camel.component.cxf.CxfConsumer$1.invoke(
        ... 22 more

That could be treated as "ok" because HTTP-GET doesn't make sense in this case.

3. Repeat step 1 and instead of getting the expected pong-response you'll get the same exception
with same stacktrace as in step 2

> A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests
> ---------------------------------------------------------------------------------------
>                 Key: CAMEL-2144
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-cxf
>    Affects Versions: 2.0.0
>            Reporter: Jonny Newald
>            Assignee: Willem Jiang
>             Fix For: 2.1.0
>         Attachments: camel-2144.patch, camel-bug.xml, service.wsdl,
> Start a fine configured system with came-cxf consumer endpoint using http. Make some
tests with valid SOAP-Messages. Then just send a HTTP-Get-Request to the endpoint (e.g. with
Browser). You'll get some kind of Exception saying
> java.lang.ClassCastException: org.apache.cxf.message.MessageContentsList cannot be cast
to org.w3c.dom.Node
> Ok, this could be interpreted as "There is no content to convert into Node..." as, if
you debug, you'll see, that an empty MessageContentsList is provided by camel-cxf as the body
of the camel message. Of course, if the Request would contain a body, the camel body would
be a non empty MessageContentsList and the type converter mechanism would find a way to convert
the list into a w3c Document, but that's not the point. The Bug is, that this null-body-request
puts the DefaultTypeConverter into a state, that let always return null for bodies of type
MessageContentsList, even if it's not empty (which is normal). I think that there is certain
'misses'-map responsible for that kind of 'miss'-state...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message