You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "John McKeogh (JIRA)" <ji...@apache.org> on 2014/11/12 18:01:34 UTC

[jira] [Created] (CAMEL-8042) CxfClientCallBack handleException does not honour exception

John McKeogh created CAMEL-8042:
-----------------------------------

             Summary: CxfClientCallBack handleException does not honour exception
                 Key: CAMEL-8042
                 URL: https://issues.apache.org/jira/browse/CAMEL-8042
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.14.0, 2.11.2
         Environment: Windows
            Reporter: John McKeogh
             Fix For: 2.14.1


Hi,

Since Camel 2.11.2, The cxfClientCallBack doesn't seem to be honouring the exception that it is passed in.

Here is a copy of the HandleException funciton before and after 11.2
		2.11.1
		 public void handleException(Map<String, Object> ctx, Throwable ex) {
        try {
            super.handleException(ctx, ex);
            camelExchange.setException(ex); 
        } finally {
            // copy 

2.11.2
  public void handleException(Map<String, Object> ctx, Throwable ex) {
        try {
            super.handleException(ctx, ex);
            // need to call the conduitSelector complete method to enable the fail over feature
            ConduitSelector conduitSelector = cxfExchange.get(ConduitSelector.class);
            if (conduitSelector != null) {
                conduitSelector.complete(cxfExchange);
                ex = cxfExchange.getOutMessage().getContent(Exception.class);
                if (ex == null && cxfExchange.getInMessage() != null) {
                    ex = cxfExchange.getInMessage().getContent(Exception.class);
                }
                if (ex != null) {
                    camelExchange.setException(ex);
                }
            } else {
                camelExchange.setException(ex);
            }
        } finally {

So for our testcase where we have a cxf client calling through camel to a Corba web service, the exception that the webservice is passing back to camel is no longer honoured.

I believe this change was introduced by the following jira:
https://issues.apache.org/jira/browse/CAMEL-6609

I have attached the wsdl of the corba web-service.
In the service we are calling PingMe expecting to get back a PingMeFault_Exception. The exception is set in the cxf corba binding and reached the exception handler in camel. But the exception is no longer being sent back to the client. Instead a generic SoapFaultException is reaching the client.

Cheers,
John.





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