I use the classes generated by the axis tools and indeed in the client the exceptions 
derivate from AxisFault.
The OperationFailedException code example in my previous mail is the one that reside 
on the server side. 
But the problem is still there.
By the way my server is not axis but an OC4J (Oracle Components For Java) with the 
WSDL generated from Axis tool.

Thanks,
Lior.

-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: 21 July 2003 14:54
To: [EMAIL PROTECTED]
Subject: Re: Help! how to catch application exception - in the client?


Peter,
PLEASE don't make such assertions....Can you point us to the exact paragraph in 
JAX-RPC spec that
says that generated code should NOT extend implementation specific classes? 

Lior,
Please use the exception classes generated by the axis tools and let us know if you 
see a problem
doing that.

Thanks,
dims

--- Peter Landmann <[EMAIL PROTECTED]> wrote:
> 
> Hi Lior,
> 
> This is a bug in the Axis client, it doesn't conform to the RAX-RPC
> specificatin in this point: It can't map application exceptions correctly,
> it maps it only to exceptions derivated from AxisFault. See my previous
> emails on this list, subject: "Problem with custom exceptions not getting
> deserialized".
> 
> Best regards,
> Peter
> 
> __________________________________________
> Peter Landmann
> e-Business Services
> System Engineer
> Tel.: +49 89 898157-85
> Fax: +49 89 898157-49
> mailto:[EMAIL PROTECTED]
> __________________________________________
> PEGAS systemhaus gmbh
> Rudolf-Diesel-Str. 1
> D-82166 Gräfelfing
> http://www.pegas.com/
> http://www.e-integrator.de/
> __________________________________________
> 
> 
> |---------+------------------------------------>
> |         |           "Lior Weintraub"         |
> |         |           <[EMAIL PROTECTED]|
> |         |           active.com>              |
> |         |                                    |
> |         |           21.07.2003 11:33         |
> |         |           Bitte antworten an       |
> |         |           axis-user                |
> |         |                                    |
> |---------+------------------------------------>
>  
>
>---------------------------------------------------------------------------------------------------------------|
>   |                                                                                  
>            
>                  |
>   |        An:      <[EMAIL PROTECTED]>                                              
>      
>                  |
>   |        Kopie:                                                                    
>            
>                  |
>   |        Thema:   Help! how to catch application exception - in the client?        
>            
>                  |
>  
>
>---------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> 
> Hi,
> 
> I have the following method I published as web service:
>   public String createMediaFile(String name) throws
> OperationFailedException
> 
> Where OperationFailedException extends java.lang.Exception.
> 
> I created the wsdl using axis java2wsdl tool.
> And created a java client using axis wsdl2java tool.
> 
> Now in the client I have the following code:
>         try{
>             TestExceptionServiceLocator serviceLocator = new
> TestExceptionServiceLocator();
>             TestException stub =
> serviceLocator.getMypackage6TestException();
>             System.out.println(stub.createMediaFile("3"));
>         } catch(mypackage6.OperationFailedException oex) {
>             oex.printStackTrace();
>         } catch(Exception ex) {
>             ex.printStackTrace();
>         }
> 
> The web service throws a OperationFailedException but in the client it
> catches the Exception and not OperationFailedException.
> 
> Here is the code for the OperationFailedException class:
> package mypackage6;
> public class OperationFailedException extends Exception
> {
>   String msg;
>   public OperationFailedException()  {
>     super();
>   }
> 
>   public OperationFailedException(String msg) {
>     super(msg);
>     this.msg=msg;
>   }
> 
>     public String getMsg() {
>         return msg;
>     }
> 
>     public void setMsg(String newMsg) {
>         msg = newMsg;
>     }
> 
> }
> 
> Please tell me if I did something wrong or that user defined exceptions are
> simply not handled by axis? Is there a way that the java client can get the
> actual java exception that was thrown?
> 
> Thanks,
> Lior W.
> 
> 
> 
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Reply via email to