3 Replies Latest reply on Apr 10, 2006 5:20 AM by dave2

    Server faultCode

    dave2

      Hi,
      I'm converting from JBoss 3.2.4 to JBoss 4.0.4, and have got some apps running using jbossws. It's great!

      The problem I'm having is that whatever exception I throw at the webservice endpoint, it's always coming across with a faultCode of soapenv:Client.

      What I would like, is a Client fault code for checked exceptions and a Server fault code for runtime exceptions.

      Is this possible?
      If so, how do I configure it?

      Thanks in advance
      Dave

        • 1. Re: Server faultCode

          soapenv:Client indicates that the web service client did something wrong and should not resend the envelope. Whereas soapenv:Server means that an error occured while processing an envelope, but it can be redelivered. It's usally not a good idea to change these semantics, because they regarded a standard.

          It's more appropriate to use the faultString element for your requirements.

          However, if you want to hook into the fault processing it's recommanded to use a JAX-RPC handler:
          http://labs.jboss.com/portal/jbossws/user-guide/en/html/headers-handlers.html#handlers

          • 2. Re: Server faultCode

            Regarding your migration from JBoss 3.2.4 to JBoss 4.0.4:

            What you like to share your experiences with the community?
            The WIKI would be a good place for that:
            http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWS404Compatibility

            • 3. Re: Server faultCode
              dave2

              I'll try to post something to the wiki later this week. It's mostly been a fairly smooth experience.

              The problem I'm still having is that jbossws is always returning soapenv:Client whatever the exception. For example, the message below is typical of what I'm seeing:

              10:10:03,484 DEBUG [SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}Client,string=java.rmi.ServerError: Unexpected Error; nested exception is:
              java.lang.NoClassDefFoundError,actor=null,detail=null]

              The client has done no wrong, but has received a faultCode indicating that the client has sent incorrect data.
              Surely the faultCode for this error should be soapenv:Server?