axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ab...@tolstoy.com
Subject best practices for exceptions?
Date Sat, 11 Sep 2004 06:50:41 GMT
Will non-Axis implementations handle the SOAP message in 
Listing 7 here:

  http://www-106.ibm.com/developerworks/xml/library/ws-
tip-jaxrpc.html

If so, is the technique described in the article the best 
way to handle exceptions?

I'd like to be able to send a message back that my client 
would then use to show a detailed, and perhaps localized, 
message to the user. I'd also like other clients to 
understand what went wrong, even if they don't understand 
in such detail.

So, for instance, I'd use extension names or other 
parameters to send back "File Not Found/327". The "File 
Not Found" part would be understood by any client. The 
"327" part would serve as a key into a table, and would 
result in displaying something like: "The logging file 
path you specified was not found by the code that handles 
logging. Please enter a different file path, etc." I 
wouldn't send all that back from the server in case I 
wanted to localize the message. And, the "327" bit would 
probably be sent back in the 'detail' tag. In the IBM 
example, 'messageCode' would be another field of the 
InsufficientFundFault class.

Mime
View raw message