0 Replies Latest reply on Apr 26, 2009 10:40 PM by Aaron Siri

    RESTeasy, Seam and Exceptions

    Aaron Siri Newbie

      I have a component that has methods mapped to WS actions.  I'd like to use the @Restrict annotation to do security checks before the methods are even executed.  This works fine but exceptions are thrown and I don't know how to deal with them so that I can give the appropriate REST response.  I see that you can handle the response via something like:



          <exception class="org.jboss.seam.security.NotLoggedInException">
              <http-error error-code="708">Not Logged In</http-error>
          </exception>
      



      Put I wanted to give it a custom payload and redirects don't really work well for a WS environment.


      Is there somewhere I can look to see how this is done?  Can it be done?  Perhaps delegate to another component that can construct the response (and have access to the Seam scopes, etc.)?


      Thanks,


      -Aaron