[ 
https://issues.apache.org/jira/browse/CAMEL-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rahul Taneja updated CAMEL-9839:
--------------------------------
    Environment: 
1) Apache Camel Version -2.16
2) Java version - 1.7
3) Server- Jetty Plugin of Maven
4) Using Apache camel CXF component. 

  was:

1) Apache Camel Version -2.16
2) Java version - 1.7
3) Server- Jetty Plugin of Maven
4) Using Apache camel CXF component. 

       Priority: Blocker  (was: Major)
    Description: 
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";
        from(endpointUri)
                .to(logEndpoint).to(ROUTE2.ENDPOINT_URI)
                .to(logEndpoint);
    }

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

public class Route2 extends RouteBuilder {
 public void configure() throws  Exception{
        String integrationEndpoint = "xxx.integration";
onException(RuntimeException.class).handled(true).onWhen(exceptionMessage().contains("Invalid")).bean(translator,
 "translateSomeError(${property.XXX})").end();

from(ENDPOINT_URI)
.
.
. so on

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

public SomeObjectResponse translateSomeError(Object someObject) throws  
Exception{


        SomeObjectResponse someObjectResponse = new SomeObjectResponse();
someObjectResponse.setError("someError");

        return someObjectResponse ;
}

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

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body/>
</soap:Envelope>

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. 

  was:

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";
        from(endpointUri)
                .to(logEndpoint).to(ROUTE2.ENDPOINT_URI)
                .to(logEndpoint);
    }

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

public class Route2 extends RouteBuilder {
 public void configure() throws  Exception{
        String integrationEndpoint = "xxx.integration";
onException(RuntimeException.class).handled(true).onWhen(exceptionMessage().contains("Invalid")).bean(translator,
 "translateSomeError(${property.XXX})").end();

from(ENDPOINT_URI)
.
.
. so on

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

public SomeObjectResponse translateSomeError(Object someObject) throws  
Exception{


        SomeObjectResponse someObjectResponse = new SomeObjectResponse();
someObjectResponse.setError("someError");

        return someObjectResponse ;
}

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

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body/>
</soap:Envelope>

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. 


> OnException doesnt return a custom message.
> -------------------------------------------
>
>                 Key: CAMEL-9839
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9839
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.16.0
>         Environment: 1) Apache Camel Version -2.16
> 2) Java version - 1.7
> 3) Server- Jetty Plugin of Maven
> 4) Using Apache camel CXF component. 
>            Reporter: Rahul Taneja
>            Assignee: Claus Ibsen
>            Priority: Blocker
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> 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";
>         from(endpointUri)
>                 .to(logEndpoint).to(ROUTE2.ENDPOINT_URI)
>                 .to(logEndpoint);
>     }
> Second Route:(In second route , I am catching some exception through 
> onException)
> public class Route2 extends RouteBuilder {
>  public void configure() throws  Exception{
>         String integrationEndpoint = "xxx.integration";
> onException(RuntimeException.class).handled(true).onWhen(exceptionMessage().contains("Invalid")).bean(translator,
>  "translateSomeError(${property.XXX})").end();
> from(ENDPOINT_URI)
> .
> .
> . so on
> Now , In my case, the object which I am populating through onException
> public SomeObjectResponse translateSomeError(Object someObject) throws  
> Exception{
>         SomeObjectResponse someObjectResponse = new SomeObjectResponse();
> someObjectResponse.setError("someError");
>         return someObjectResponse ;
> }
> However, In SOAP UI while testing I am getting an emplty SOAP envelop
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soap:Body/>
> </soap:Envelope>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to