Title: Message
Ransel,
 
I am a beginner with SOAP & Java, also!
 
However, I believe what you need to do is to
generate your own exceptions.
 
Try "Java and SOAP" by Robert Englander, O'Reilly Press, 2002 for lots
of good info.
 
Here is code for custom fault:
 
public class generateMyFault
 
{
    public generateMyFault () // constructor
    {
    }
    public int generateCustomFault () throws SOAPException
    {
        throw new SOAPException("SOAP-ENV:Server", "My Custom Fault Message");
    }
}
 
Deploy this class and call it.
 
some fragments for client call
 
url = ""MARGIN-RIGHT: 0px">
-----Original Message-----
From: Ransel Lopez [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 6:49 PM
To: [EMAIL PROTECTED]
Subject: Building custom faults in Java

Hi, everybody
 
I am a starter with SOAP.
 
My problem is that I want to modify what I get in the client side when an exception is raised. I want to get my own faultcode, my own faultstring and some other information in the detail. Can anyone explain what should I do?? Some examples are going to help, for sure.
 
I have my own exceptions and I want to modify the standard xml soapfaul that I receive. Should I serialize a SOAPFaultFactory?? How to do this??
 
Thank you very much!!!!
 

 


Ransel López, Web Services Developer

Time Industrial, Inc.
 An Outsourced Contractor Time and Cost Tracking Service.
 -----------------------------------------------------------------------------------------
tel: 780.413.1521  fax: 780.413.0474
 http://www.TimeIndustrial.com

 -----------------------------------------------------------------------------------------
 This message and attached files, if any, is (are) intended only for the addressee(s) and may 
 contain privileged or confidential information. Any unauthorized disclosure is strictly prohibited. 
 If destined to our legal counsel, this transmission is privileged communication as between an 
 attorney and its client.
 If you have received this message in error, please notify us immediately so that we may correct 
 our internal records. Please then delete the original message. Thank you.

 
 

 

Reply via email to