File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Throwing Fault
 
Similar Threads
WS-Address working example
SOAP 1.2 Fault children qualified
Getting error while calling the .net web service from java code.
How to set security mode in a Java client code
Did not understand "MustUnderstand" header(s)