axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Kumar (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2172) Java2WSDL, stopClasses and Interfaces
Date Tue, 09 Aug 2005 05:49:36 GMT
Java2WSDL, stopClasses and Interfaces
-------------------------------------

         Key: AXIS-2172
         URL: http://issues.apache.org/jira/browse/AXIS-2172
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2.1    
 Environment: all platforms
    Reporter: Ravi Kumar
    Priority: Critical


For an interface, since getMethods is used instead of getDeclaredMethods, the methods need
to be validated against stop classes .... 

For instance:
Create a Stateless Session bean with one method
Call Java2Wsdl against it with allowedMethods set to "*" 
The wsdl will have get getEJBHome and other lifecycle methods ....

The problem is in JavaServiceDesc..... The getMethods need to be changed 

CURRENT
---------------
    private Method[] getMethods(Class implClass) {
        if (implClass.isInterface()){
            // Returns all methods incl inherited
            return implClass.getMethods();            
        } else {
            return implClass.getDeclaredMethods();
        }
    }

CHANGE TO
-----------------
    private Method[] getMethods(Class implClass) {
        if (implClass.isInterface()){
            // BEGIN BORLAND JBUILDER PATCH
            // only return methods that are not part of start classes
            List methodsList = new ArrayList();
            Method[] methods = implClass.getMethods();
            if (methods != null) {
                for (int i = 0; i < methods.length; i++) {
                    String declaringClass = methods[i].getDeclaringClass().getName();
                    if (!declaringClass.startsWith("java.") &&
                        !declaringClass.startsWith("javax.")) {
                        methodsList.add(methods[i]);
                    }   
                }
            }
            return (Method[])methodsList.toArray(new Method[]{});
            // Returns all methods incl inherited
            // return implClass.getMethods();
            // END BORLAND JBUILDER PATCH
        } else {
            return implClass.getDeclaredMethods();
        }
    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message