I cant throw the correct HTTP status codes from camel.

I have a route like this:


 from("direct:channel2").onException(Exception.class).process(new
LogError(HubConstants.CHANNEL2.getValue())).end().recipientList()
                .method(Util.class, "getEndpoint");


The endpoint is down, and i would like to set a responce code 522 back to
the client.


My Exception class is setting the response code like  this:

exchange.getOut().setFault(true);
exchange.getOut().setHeader(org.apache.cxf.message.Message.RESPONSE_CODE,
new Integer(522));


But my client "SOAPUI", still get: 500 back ....


HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Language: da-DK
Transfer-Encoding: chunked
Connection: Close
Date: Wed, 29 Oct 2014 08:29:06 GMT
Server: WebSphere Application Server/7.0

Heeeelp, any good ideas out there ? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/I-cant-throw-the-correct-HTTP-status-codes-from-camel-tp5758282.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to