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:
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.
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.