You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Joakim Sundqvist (JIRA)" <ji...@apache.org> on 2011/06/17 14:28:47 UTC

[jira] [Created] (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

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
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4116
                 URL: https://issues.apache.org/jira/browse/CAMEL-4116
             Project: Camel
          Issue Type: Improvement
          Components: camel-spring-ws
    Affects Versions: 2.7.2
            Reporter: Joakim Sundqvist


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

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

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:

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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (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

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4116:
-------------------------------

    Fix Version/s: 2.9.0
                   2.8.0
         Assignee: Richard Kettelerij

Richard do you have time to look into this? I think at least we should return HTTP status 500 if an exception was thrown. 
And I dont know if spring-ws can auto map exceptions to soap faults if its defined in the wsdl.

> 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
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4116
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4116
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ws
>    Affects Versions: 2.7.2
>            Reporter: Joakim Sundqvist
>            Assignee: Richard Kettelerij
>              Labels: exception-handling, spring, web-service
>             Fix For: 2.8.0, 2.9.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> If an Exception is thrown in the camel flow then that exception is not propagated to spring-web-services.
> Example: 
> {code}
> <camel:from uri="spring-ws:rootqname:{foo.com}BarRequest?endpointMapping=#endpointMapping"/>
>             <camel:to uri="bean:exceptionThrower?method=throwException"/>
> {code}
> 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:
> {code}
>  if(exchange.getException() != null){
>      throw exchange.getException();
>  }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Work started] (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

Posted by "Richard Kettelerij (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-4116 started by Richard Kettelerij.

> 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
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4116
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4116
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ws
>    Affects Versions: 2.7.2
>            Reporter: Joakim Sundqvist
>            Assignee: Richard Kettelerij
>              Labels: exception-handling, spring, web-service
>             Fix For: 2.8.0, 2.9.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> If an Exception is thrown in the camel flow then that exception is not propagated to spring-web-services.
> Example: 
> {code}
> <camel:from uri="spring-ws:rootqname:{foo.com}BarRequest?endpointMapping=#endpointMapping"/>
>             <camel:to uri="bean:exceptionThrower?method=throwException"/>
> {code}
> 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:
> {code}
>  if(exchange.getException() != null){
>      throw exchange.getException();
>  }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (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

Posted by "Joakim Sundqvist (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051846#comment-13051846 ] 

Joakim Sundqvist commented on CAMEL-4116:
-----------------------------------------

I have have tried the snapshot build and it works.

Thank you for picking up the issue so fast.

//  Joakim Sundqvist


> 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
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4116
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4116
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ws
>    Affects Versions: 2.7.2
>            Reporter: Joakim Sundqvist
>            Assignee: Richard Kettelerij
>              Labels: exception-handling, spring, web-service
>             Fix For: 2.8.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> If an Exception is thrown in the camel flow then that exception is not propagated to spring-web-services.
> Example: 
> {code}
> <camel:from uri="spring-ws:rootqname:{foo.com}BarRequest?endpointMapping=#endpointMapping"/>
>             <camel:to uri="bean:exceptionThrower?method=throwException"/>
> {code}
> 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:
> {code}
>  if(exchange.getException() != null){
>      throw exchange.getException();
>  }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (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

Posted by "Richard Kettelerij (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Kettelerij resolved CAMEL-4116.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.9.0)

@Joakim, thanks for reporting. I've fixed the issue on trunk. Exceptions thrown during routing will now propagate back to Spring-WS, see unit test for details. 

@Claus, Yes Spring-WS by default translates exceptions to SOAP faults. See http://static.springsource.org/spring-ws/sites/2.0/reference/html/server.html#server-endpoint-exception-resolver for details.

> 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
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4116
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4116
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ws
>    Affects Versions: 2.7.2
>            Reporter: Joakim Sundqvist
>            Assignee: Richard Kettelerij
>              Labels: exception-handling, spring, web-service
>             Fix For: 2.8.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> If an Exception is thrown in the camel flow then that exception is not propagated to spring-web-services.
> Example: 
> {code}
> <camel:from uri="spring-ws:rootqname:{foo.com}BarRequest?endpointMapping=#endpointMapping"/>
>             <camel:to uri="bean:exceptionThrower?method=throwException"/>
> {code}
> 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:
> {code}
>  if(exchange.getException() != null){
>      throw exchange.getException();
>  }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira