You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by James Snell <js...@lemoorenet.com> on 2001/02/21 07:01:08 UTC

Proposed Modification: AxisFault

Proposed Modifications To Current Codebase

===============================================================
RE: AxisFault Class
===============================================================
1. AxisFault rename to AxisException.  I'd much prefer to keep with
   standard conventions on naming Exception classes.
   Not that big of a deal though ;-)


2. The current AxisFault class models the faultCode attribute as a
   string.  I'd like to propose that we actually change this to a QName
   class (org.apache.axis.utils.QName).  My reasoning is based on the
   following excerpt from the SOAP Specification:

   -------------------------------------------------------------------------
   Section 4.4.1 SOAP Fault Codes
   The default SOAP faultcode values are defined in an extensible manner
   that allows for new SOAP faultcode values to be defined while maintaining
   backwards compatibility with existing faultcode values. The mechanism
   used is very similar to the 1xx, 2xx, 3xx etc basic status classes
classes
   defined in HTTP (see [5] section 10). However, instead of integers, they
   are defined as XML qualified names (see [8] section 3). The character "."
   (dot) is used as a separator of faultcode values indicating that what is
   to the left of the dot is a more generic fault code value than the value
   to the right.
   -------------------------------------------------------------------------

   Fault Codes in SOAP, then, are namespace extensible and should be modeled
as such
   within Axis.  This would look something like:

    <snip>
      QName SERVER_FAULT = new QName(SOAP_NS_URI, "Server")
      AxisException ae = new AxisException(SERVER_FAULT, ...)
    </snip>

    Common Fault Code QName's can be defined in Constants.java.

3. We remove all reference to DOM in the AxisFault class.  This would mean
nix'ing the
     getAsDOM method and the Details attribute would need to be Object[]
instead of
     Element[] .