camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narsi Nallamilli <narsi.nallami...@gmail.com>
Subject Re: camel CxfRsProducer not returning appropriate error status codes
Date Thu, 17 Mar 2016 03:45:49 GMT
Yes, Brad,

The patch should be while creating the exception, 

We should copy the status to the headers so that the header is received with
correct status at the receiving end, which not being done currently and
every exception created out of CxfOperationException is treated as server
exception.

public CxfOperationException(String uri, int statusCode, String statusText,
String location, Map<String, String> responseHeaders,
                                 String responseBody) {
        super("JAXRS operation failed invoking " + uri + " with statusCode:
" + statusCode + (location != null ? ", redirectLocation: " + location
            : ""));
        this.uri = uri;
        this.statusCode = statusCode;
        this.statusText = statusText;
        this.redirectLocation = location;
        this.responseHeaders = responseHeaders;
        this.responseBody = responseBody;
}



--
View this message in context: http://camel.465427.n5.nabble.com/camel-CxfRsProducer-not-returning-appropriate-error-status-codes-tp5779161p5779177.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message