camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-2183) camel-cxf - Empty body causes http error 500 even for GET when using cxfbean
Date Tue, 17 Nov 2009 10:03:52 GMT
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.


Mime
View raw message