Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4116

SpringWebserviceConsumer should check if there is an Exception connected to the exchange and throw that one if it exists so that the default Errorhandling in spring-ws can take place

    XMLWordPrintableJSON

Details

    Description

      If an Exception is thrown in the camel flow then that exception is not propagated to spring-web-services.

      Example:

      <camel:from uri="spring-ws:rootqname:{foo.com}BarRequest?endpointMapping=#endpointMapping"/>
                  <camel:to uri="bean:exceptionThrower?method=throwException"/>
      

      This would result in an empty response from spring web-services with a status code of 202 (accepted).

      If the check was made on the Exchange to see if there was an Exception thrown then that one could be rethrown and the Exception-handling in spring web services could do its magic.

      In SpringWebserviceConsumer add this to the invoke method:

       if(exchange.getException() != null){
           throw exchange.getException();
       }
      

      Attachments

        Activity

          People

            rkettelerij Richard Kettelerij
            poker_jocke Joakim Sundqvist
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified