This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Web Services and the fly likes Throwing Fault Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Throwing Fault" Watch "Throwing Fault" New topic
Author

Throwing Fault

Mr.Zuir Alex
Greenhorn

Joined: Aug 07, 2007
Posts: 5
Hi All,

It will be of great help if someone could provide me with some examples. As to how can, I throw my custom exception or AxisFault. I would like to throw an AxisFault and set its various parameters in the following constructor:

AxisFault(java.lang.String code, java.lang.String faultString,
java.lang.String actor, org.w3c.dom.Element[] details)

Could someone help me with an example as to how to provide the org.w3c.dom.Element[] details in it.
Also, I need to generate this response in the following format:

The definitions of faults use the following properties:


Do, I need to add headers or will they be automatically added?

Please Help !!

Thanks & Regards,
GreenHorn
[ August 23, 2007: Message edited by: Mr.Zuir Alex ]
Mr.Zuir Alex
Greenhorn

Joined: Aug 07, 2007
Posts: 5
Hi Folks,

Please help on this issue.

Thanks,
GreenHorn
Mr.Zuir Alex
Greenhorn

Joined: Aug 07, 2007
Posts: 5
Hi Again,

I found something after doing little study on this.


Please let me know if this is the correct approach to send fault to the client?

Also had a confusion on how will axis be formatting it?
I mean, which soap version 1.1 or 1.2 and will it be sent like SOAP response first of all?

Help Required!!

Thanks,
GreenHorn
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Throwing Fault
 
It's not a secret anymore!