You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Jonny Newald (JIRA)" <ji...@apache.org> on 2009/11/06 14:38:52 UTC

[jira] Created: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

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


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.


[jira] Assigned: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-2144:
----------------------------------

    Assignee: Willem Jiang

Willem can you take a look at this later. I have attached a suggestion for a patch. The basic idea is to return VOID when you cannot convert at this given time, such as when the MessageContextList contains empty bodies etc.

You may want to work with it a bit and add some unit test, e.g. that send in a HTTP GET with no XML data and then later do a real webservice call.

> 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
>
>
> 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.


[jira] Updated: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Jonny Newald (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2144:
-------------------------------

    Attachment: camel-2144.patch

A patch with a suggestion for a fix

> 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
>         Attachments: camel-2144.patch
>
>
> 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.


[jira] Commented: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55260#action_55260 ] 

Willem Jiang commented on CAMEL-2144:
-------------------------------------

@Claus, 
I tried to apply your patch and tried to feed the converter with some empty MessageContentsList.
I found your patch doesn't change anything :)
The last line's return null will cover the situation of empty MessageContextList.

> 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
>
>
> 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.


[jira] Commented: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55428#action_55428 ] 

Willem Jiang commented on CAMEL-2144:
-------------------------------------

Yes, I can reproduce the issue.
This looks like the Null Message will make the cxfConverter treat the MessageContentsList to Node be impossible if there is a null message passed in.

Claus' fix resolved this issue, and I just added a test to verify it.



> 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.


[jira] Resolved: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-2144.
---------------------------------

    Resolution: Fixed

trunk
http://svn.apache.org/viewvc?rev=880644&view=rev

> 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.


[jira] Commented: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55261#action_55261 ] 

Claus Ibsen commented on CAMEL-2144:
------------------------------------

The idea is to return Void when you *cannot* convert such as in a situation where there MessageContextList is invalid. Then it wont be regarded as a *miss* and Camel will try this converter combination later on.

> 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
>
>
> 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.


[jira] Commented: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55259#action_55259 ] 

Willem Jiang commented on CAMEL-2144:
-------------------------------------

@Jonny

I tried to reproduce the error on the [CxfConsumerTest | https://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java] , but no luck with it.
Can you submit the stack trace and the  route to this JIRA?


> 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
>
>
> 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.


[jira] Updated: (CAMEL-2144) A null-Message to a cxf-endpoint (e.g. HTTP-GET) can disable accepting regular requests

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2144:
-------------------------------

    Fix Version/s: 2.1.0

> 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
>
>
> 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.