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

[jira] Resolved: (CAMEL-2183) camel-cxf - Empty body causes http error 500 even for GET when using cxfbean

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

Claus Ibsen resolved CAMEL-2183.
--------------------------------

    Resolution: Fixed

Thanks William

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