Hi,

I have a service implementation, that is NOT generated by WSDL2Java. It is just 
simple Java-classes.
There I have some methods, that can throw my own UserExceptions.

To put some helpful response back to the client, I manually create my 
SOAPFaults and put them on the incoming MessageContext, then throwing an 
AxisFault. Chinthaka was so kind to describe that on: 
http://www.wso2.net/kb/171

So shortly, how it looks like:

------ Service imlementation ------
....

public OMElement myMethod(OMElement input) throws AxisFault {
   try {
       // do what the service should do
       throw new MyUserException("message", originalException);
   }
   catch ( (Exception e) {
      // build the SOAPFault with all the details
      // put it on the MC
      // throw new AxisFault("some errortext");
  }
}

--------- MYUserExcption -----------
public class MyUserException extends RemoteException {

                public MyUserException(String message, Throwable ex){
                        super(message, ex);                                   
                }
}


I suggest, if I generate a WSDL-File from this code, there would not appear 
MyUserException in a faultmessage.
I have to admit, I haven't tried it so far.
My questions:
- Is this the right way to use UserExceptions?
- How can I achieve the Userexceptions been represented in the WSDL-file?

Maybe someone could provide an example?!

Thanks in advance for your time

Bille

______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to