You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Andrej Koshelev <ak...@hotmail.com> on 2005/03/02 06:54:58 UTC

Fw: Exceptions in generated WSDL


Hi,

this error(?) takes place when I want to generate the WSDL file for the webservice that throws two various exceptions:
--------------------
package com.wsdltest;

public interface SoapFile {

 public int goFirst() 
  throws FirstException;
 

 public int goSecond() 
  throws SecondException;
 
}
--------------------
FirstException and SecondException are the sublasses of RemoteException.
  =>
1. The section from the generated WSDL file contains different descriptions for 
FirstException and SecondException even if they're the same:

   <complexType name="FirstException">
    <sequence>
     <element name="cause" nillable="true" type="xsd:anyType"/>
     <element name="message" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="SecondException">
    <sequence>
     <element name="cause" nillable="true" type="tns3:Throwable"/>
     <element name="message" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>

2. 'tns3:Throwable' causes the problems when we generate java stubs from this WSDL:
    java.io.IOException: Type {http://lang.java}Throwable is referenced but not defined.

Thanks,
andrej