3 Replies Latest reply on Nov 15, 2004 7:53 PM by Thomas Diesler

    Where is the Wiki section"Mapping custom exceptions"?

    cglommen Newbie

      "Mapping custom exceptions" is listed in the Wiki, but is not hyperlinked. Does JBoss not support custom exceptions? Where can I find guidance as to utilizing application thrown faults?

        • 1. Re: Where is the Wiki section
          Jason Greene Master

          Custom exception support have been fixed in 4.0.1 (soon to be released). Custom exceptions are used in the same way that custom beans are used. The only difference is that a constructor is searched for (instead of an accessor method) since java does not expose acesss to the exception message. All you have to do is create a custom exception, and make sure that you have a constructor for all values in your exception, as well as get methods.

          An important thing to note is that wscompile is not very good about generating the correct order of the arguments. Which means that your constructor may be called with the arguments in the wrong order. If this occurs you will need to refer to <a href="http://www.jboss.org/wiki/Wiki.jsp?page=WSTypeMapping>WSTypeMapping in the wiki to create a ws4ee-deployment.xml file which controls the order.

          From my observations, it appears that wscompile generates its wsdl in subclass->superclass, type, name order.


          • 2. Re: Where is the Wiki section
            cglommen Newbie

            Thanks for the reply. Could you be more specific on how I create/utilize custom faults? Or where to find such information?

            • 3. Re: Where is the Wiki section
              Thomas Diesler Master

              If you are familiar with CVS, check out jboss-4.0 Branch_4_0.

              cd testsuite
              ant tests-webservice

              You will see a test case for custom exceptions.