camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonny Newald (JIRA)" <j...@apache.org>
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

     [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonny Newald updated CAMEL-2144:
--------------------------------

    Attachment: ServiceProvider.java
                service.wsdl
                camel-bug.xml

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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="test/service">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:ping/>
   </soapenv:Body>
</soapenv:Envelope>

You should get a response like this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <pong xmlns="test/service"/>
   </soap:Body>
</soap:Envelope>

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
stdout-console:

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(CxfConsumer.java:95)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:95)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89)
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302)
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:265)
        at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
Caused by: java.lang.ClassCastException: org.apache.cxf.message.MessageContentsList cannot
be cast to org.w3c.dom.Node
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:116)
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:98)
        at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:180)
        at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:438)
        at org.apache.camel.builder.xml.XPathBuilder.matches(XPathBuilder.java:104)
        at org.apache.camel.processor.FilterProcessor.process(FilterProcessor.java:41)
        at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:186)
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:155)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
        at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
        at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:148)
        at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
        at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
        at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:85)
        ... 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: https://issues.apache.org/activemq/browse/CAMEL-2144
>             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, ServiceProvider.java
>
>
> 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.


Mime
View raw message