When my endpoint is down, i want to create a soap fault, and set the reponse
code to 504.
What you cant see, is that on the endpoint have a:
"?throwExceptionOnFailure=false"
My Route:
from("direct:channel2").onException(Exception.class).handled(true).
process(new
LogError(HubConstants.CHANNEL2.getValue())).end()
.recipientList()
.method(Util.class, "getEndpoint");
When the endpoint is down, i come into my exception.class, where i have
this code:
exchange.removeProperty(Exchange.EXCEPTION_CAUGHT);
exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 504);
exchange.getOut().setFault(true);
SoapFault sf = new SoapFault("Central svarer ikke hos " + central,
SoapFault.FAULT_CODE_SERVER);
The client get the soap fault , but the reponse code is 500, and NOT 504...
Can anyone tell me whats wrong here ?
Frank
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-setHeader-reponse-code-tp5763820.html
Sent from the Camel - Users mailing list archive at Nabble.com.