Announcement Announcement Module
No announcement yet.
Handling Exceptions From Aspects Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling Exceptions From Aspects

    Hi There,

    I'm developing web services based on spring 3.1.1 and spring-ws 2.0. What I've is following
    1. Couple of endpoints exposing methods annotated with PayloadRoot/ReponseBody
    2. Have one aspect with an around advice which wraps around all endpoints and methods annotated with PayloadRoot. this aspect does couple of check on the incoming request and if something goes wrong throws an exception with some message

    What happens is when an exception is thrown from this aspect, I see the SoapFault as response as below
             <faultstring xml:lang="en">java.lang.reflect.UndeclaredThrowableException</faultstring>
    What I am expecting is to see the message thrown with the exception from Aspect as faultString. I also have exception resolver configure in my context with the exception mapping which is thrown from the aspect.

    I've no idea whats going wrong or if I'm missing any configuration. Any help in this regards is much appreciated.