camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rahultaneja <>
Subject OnException Not returning a custom Response
Date Thu, 07 Apr 2016 16:41:32 GMT
Hi All,
 I have the below scenario and from this I am not able to return a custom
response. Before I brief about the trouble I am facing, Below are the
1) Apache Camel Version -2.16
2) Java version - 1.7
3) Server- Jetty Plugin of Maven
4) Using Apache camel CXF component.

I am having this issue in my apache camel code which I have tried to resolve
from every angle, but I could not resolve it.

1) I have two route as below, First route is as below:

public class XXXRoute1 extends RouteBuilder {
    public void configure() {
        String endpointUri = "cxf:/XXX;
        String logEndpoint = "log:" + XXX() + "?level=DEBUG";

Second Route:(In second route , I am catching some exception through

public class Route2 extends RouteBuilder {
 public void configure() throws  Exception{
        String integrationEndpoint = "xxx.integration";

. so on

Now , In my case, the object which I am populating through onException

public SomeObjectResponse translateSomeError(Object someObject) throws 

        SomeObjectResponse someObjectResponse = new SomeObjectResponse();

        return someObjectResponse ;

However, In SOAP UI while testing I am getting an emplty SOAP envelop

<soap:Envelope xmlns:soap="">

I am using cxf component in apache camel. Thanks in advance for looking into
this issue.

The above response comes,I have tried the following things doTry,
onException, Different properties of exchange set, even try catch block in
java has been tried but same response.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message