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 Chris Nappin <C....@ABM-UK.COM> on 2005/08/25 17:42:13 UTC

How to throw custom exceptions?

 

Hi,

 

  I'm having trouble throwing custom exceptions in an interoperable way
in Axis 1.2.1. I've read previous mailing list messages and looked at
the "samples/faults" files but haven't got very far. I've been unable to
get any custom data into the "detail" section of the fault.

 

Can someone please clarify:

 

1.	What should my exception look like - does it extend Exception,
RemoteException or ApacheFault? Does it need to be Serializable? Does
Axis support the JAX-RPC way of having exceptions as immutable beans
(constructors for setting properties, getters for reading, no setters)?
2.	What should my service signature look like - simply "throws
MyCustomException"?
3.	What extra needs to go into my server-config.wsdd - I've tried
adding an operation section with a fault, and a typeMapping.
4.	I have lots of details of my custom fault in my wsdl, but if we
don't use wsdl2java then Axis won't actually use that, right?

 

Thanks, 


Chris Nappin

Technical Architect
 
ABM United Kingdom Limited
Telephone: +44 (0) 115 977 6999
Facsimile: +44 (0) 115 977 6850
Web: http://www.abm-uk.com
 
ABM for Intelligent Solutions

 


 
CONFIDENTIALITY & PRIVILEGE NOTICE

This e-mail is confidential to its intended recipient. It may also be privileged. Neither the confidentiality nor any privilege attaching to this e-mail is waived lost or destroyed by reason that it has been mistakenly transmitted to a person or entity other than its intended recipient. If you are not the intended recipient please notify us immediately by telephone or fax at the numbers provided above or e-mail by Reply To Author and return the printed e-mail to us by post at our expense. We believe, but do not warrant, that this e-mail and any attachments are virus-free, but you should check. We may monitor traffic data of both business and personal e-mails. We are not liable for any opinions expressed by the sender where this is a non-business e-mail. If you do not receive all the message, or if you have difficulty with the transmission, please telephone us immediately.