axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benazech Cédric <>
Subject Excepetion->wsdl : bug in MethodRep ??
Date Tue, 16 Apr 2002 12:47:52 GMT
Axis has a strange behaviour with an Exception.

In this exception, there are private fields. When the exception is written
in the WSDL file (?wsdl), the private fields are declared.
I'm not sure, but it seems like a bug ...

I downloaded the nightly build and look for the implemetation of this
It's located in the org.apache.axis.wsdl.fromJava.MethodRep class :

see theses lines (l.144) :

        Class[] exceptionTypes = new
        exceptionTypes = method.getExceptionTypes();

        for (int i=0; i < exceptionTypes.length; i++) {
            // Every remote method declares a java.rmi.RemoteException
            if (exceptionTypes[i] != java.rmi.RemoteException.class) {
                Field[] f = exceptionTypes[i].getDeclaredFields(); 
                Vector exceptionParams = new Vector();
                for (int j = 0; j < f.length; j++) {
                    exceptionParams.add(new ParamRep(f[j].getName(),
                String pkgAndClsName = exceptionTypes[i].getName();
                _exceptions.add(new ExceptionRep(pkgAndClsName,


all the fields of the exception are added to the Vector. I think there
should be a test, and that only the public fields or fiels that have getter
methods (setter are not needed) should be added.

An other problem : An of the field of my Exception was a Throwable object.
It's strange to see that the Throwable type was defined in the WSDL ... I
saw that the stopClasses attribute in Emitter used to stop the inheritance
description in the WSDL was null when it is used inside the AxisServlet. Is
this normal ?


View raw message