You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tysnes Are Thobias <ar...@edb.com> on 2005/03/15 14:06:36 UTC

faultcodes in SoapFaults thrown from Axis

Hello!

It looks to me that Axis throws SoapFaults with the following
faultcodes:

- Client
- Server.generalException
- Server.userException
- VersionMismatch
- MustUnserstand
- Server.NoService

Wonder if someone could confirm this :o)

Cheers,
Are T. Tysnes

Re: faultcodes in SoapFaults thrown from Axis

Posted by Anne Thomas Manes <at...@gmail.com>.
I've raised this issue on more than one occasion. The use of the "dot"
notation in fault error codes is discouraged by the WS-I BP:

<wsiExcerpt>
3.3.6 SOAP Custom Fault Codes

SOAP 1.1 allows custom fault codes to appear inside the faultcode
element, through the use of the "dot" notation.

Use of this mechanism to extend the meaning of the SOAP 1.1-defined
fault codes can lead to namespace collision. Therefore, its use should
be avoided, as doing so may cause interoperability issues when the
same names are used in the right-hand side of the "." (dot) to convey
different meaning.

Instead, the Profile encourages the use of the fault codes defined in
SOAP 1.1, along with additional information in the detail element to
convey the nature of the fault.

Alternatively, it is acceptable to define custom fault codes in a
namespace controlled by the specifying authority.

A number of specifications have already defined custom fault codes
using the "." (dot) notation. Despite this, their use in future
specifications is discouraged.

R1004 When an ENVELOPE contains a faultcode element, the content of
that element SHOULD be either one of the fault codes defined in SOAP
1.1 (supplying additional information if necessary in the detail
element), or a Qname whose namespace is controlled by the fault's
specifying authority (in that order of preference).

R1031 When an ENVELOPE contains a faultcode element the content of
that element SHOULD NOT use of the SOAP 1.1 "dot" notation to refine
the meaning of the fault.

It is recommended that applications that require custom fault codes
either use the SOAP1.1 defined fault codes and supply additional
information in the detail element, or that they define these codes in
a namespace that is controlled by the specifying authority.
</wsiExcerpt>

Also note that the whole concept of Server.userException makes
absolutely no sense. If the fault is caused by a user exception, then
the proper fault code is Client, not Server.

Per the SOAP 1.1 specification:

<soapSpecExcerpt>
Client
	
The Client class of errors indicate that the message was incorrectly
formed or did not contain the appropriate information in order to
succeed. For example, the message could lack the proper authentication
or payment information. It is generally an indication that the message
should not be resent without change. See also section 4.4 for a
description of the SOAP Fault detail sub-element.

Server

The Server class of errors indicate that the message could not be
processed for reasons not directly attributable to the contents of the
message itself but rather to the processing of the message. For
example, processing could include communicating with an upstream
processor, which didn't respond. The message may succeed at a later
point in time. See also section 4.4 for a description of the SOAP
Fault detail sub-element.
</soapSpecExcerpt>
 


On Tue, 15 Mar 2005 14:06:36 +0100, Tysnes Are Thobias
<ar...@edb.com> wrote:
> 
> Hello!
> 
> It looks to me that Axis throws SoapFaults with the following
> faultcodes:
> 
> - Client
> - Server.generalException
> - Server.userException
> - VersionMismatch
> - MustUnserstand
> - Server.NoService
> 
> Wonder if someone could confirm this :o)
> 
> Cheers,
> Are T. Tysnes
>