[ 
https://issues.apache.org/activemq/browse/CAMEL-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55491#action_55491
 ] 

Claus Ibsen commented on CAMEL-2183:
------------------------------------

William I have committed at rev: 881227.

> camel-cxf - Empty body causes http error 500 even for GET when using cxfbean
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-2183
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2183
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: William Tam
>             Fix For: 2.1.0
>
>
> CxfSoapBinding has a bug that it mandates a body to exist. But when you send 
> a GET then there is of course no body.
> The code below fixed this in the method {{getCxfInMessage}}
> {code}
>         // body can be empty in case of GET etc.
>         InputStream body = message.getBody(InputStream.class);
>         if (body != null) {
>             answer.setContent(InputStream.class, body);
>         } else if (message.getBody() != null) {
>             // fallback and set the body as what it is
>             answer.setContent(Object.class, body);
>         }
> {code}
> Willem Tam can you review if that is okay? Maybe the code can be more finer 
> to check the HTTP method and in cases of GET etc. it allows no body.
> I will commit my fix to get the unit tests passing.

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

Reply via email to