wood burning stoves 2.0*
The moose likes Web Services and the fly likes Server or Client fault code?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Server or Client fault code??" Watch "Server or Client fault code??" New topic
Author

Server or Client fault code??

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello,
I have a doubt about the following point: I am experimenting with web services and I deliberately throw an exception from an ejb web service endpoint. Here is what I get:



Notice it explicitely says
Server error: AxisFault
and then it goes on to say
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client


This is very confusing and it was really the last thing I expected. (Client fault code???).

Any idea why axis returns this "client" fault code???

Thanks in advance,

Julien Martin.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
If you're dealing with an instance of javax.xml.soap.SOAPFault -which is the standard SOAP exception-, there's always a "fault code" involved. Some of the predefined fault codes are "client" and "server". I would guess that wherever this exception is generated, in this instance an incorrect fault code is set. This SAAJ introduction has some more detail on SOAP faults.


Ping & DNS - updated with new look and Ping home screen widget
Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
an incorrect fault code is set.
Do you mean this is a bug in axis/jboss?
Julien.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
Do you mean this is a bug in axis/jboss?

Not necessarily. The text linked above says this about Client vs. Server fault codes:

Client
Indicates that the message was improperly constructed by its originator.

Server
Indicates that a processing error occurred within the server. ... This code should not be used when the cause of the error is related to content or construction of the message.


So it's up to the SOAP engine to determine what the root cause was, whether it was the contents of the request or the processing of the server. It's a grey area.
The difference for the client is that a request that resulted in a "Client" fault should not be resent unchanged, because it will again result in the same fault, while a request that caused a "Server" fault could be repeated on the grounds that the server might then have recovered.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server or Client fault code??
 
Similar Threads
Axis 1.4 NoClassDefFoundError on JBoss
java.sql.SQLException: No suitable driver
Exception propogation in Jboss EJB.
ClassCastException in JBOSS 5.0.1.GA