axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rku...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdlgen Emitter.java Java2Wsdl.java
Date Sun, 02 Dec 2001 22:45:28 GMT
rkumar      01/12/02 14:45:28

  Modified:    java/src/org/apache/axis/wsdlgen Emitter.java Java2Wsdl.java
  Log:
  Allowed methods now can be from inherited class as well.
  Next step is to allow exposing of methods based on interfaces
  
  Revision  Changes    Path
  1.11      +16 -1     xml-axis/java/src/org/apache/axis/wsdlgen/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdlgen/Emitter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Emitter.java	2001/11/30 17:51:17	1.10
  +++ Emitter.java	2001/12/02 22:45:28	1.11
  @@ -113,6 +113,7 @@
   
       private Class cls;
       private String allowedMethods;
  +    private boolean useInheritedMethods = false;
       private String intfNS;          
       private String implNS;
       private String locationUrl;
  @@ -405,7 +406,13 @@
   
           portType.setQName(new javax.wsdl.QName(intfNS, clsName + "PortType"));
   
  -        Method[] methods = cls.getDeclaredMethods();
  +        /** @todo should introduce allowInterfaces, to publish all methods from a interface
*/
  +        /** @todo if allowedMethods is specified always look for inherited methods as well??
*/
  +        Method[] methods;
  +        if (useInheritedMethods & (allowedMethods != null) && (allowedMethods.trim().length()
> 0))
  +          methods = cls.getMethods();
  +        else
  +          methods = cls.getDeclaredMethods();
   
           for(int i = 0, j = methods.length; i < j; i++) {
               if (allowedMethods != null) {
  @@ -677,6 +684,14 @@
       public void setAllowedMethods(String allowedMethods) {
           this.allowedMethods = allowedMethods;
       }
  +    
  +    public boolean getUseInheritedMethods() {
  +        return useInheritedMethods;
  +    }    
  +
  +    public void setUseInheritedMethods(boolean useInheritedMethods) {
  +        this.useInheritedMethods = useInheritedMethods;
  +    }    
   
       /**
        * get the packagename to namespace map
  
  
  
  1.7       +9 -0      xml-axis/java/src/org/apache/axis/wsdlgen/Java2Wsdl.java
  
  Index: Java2Wsdl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdlgen/Java2Wsdl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Java2Wsdl.java	2001/11/30 16:13:47	1.6
  +++ Java2Wsdl.java	2001/12/02 22:45:28	1.7
  @@ -82,6 +82,7 @@
       protected static final int LOCATION_IMPORT_OPT = 'L';
   //    protected static final int CLASSDIR_OPT = 'c';
       protected static final int METHODS_ALLOWED_OPT = 'm';
  +    protected static final int INHERITED_CLASS_OPT = 'a';
   
       /**
        *  Define the understood options. Each CLOptionDescriptor contains:
  @@ -125,6 +126,10 @@
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   METHODS_ALLOWED_OPT,
                   "space seperated list of methods to export"),
  +        new CLOptionDescriptor("methods",
  +                CLOptionDescriptor.ARGUMENT_DISALLOWED,
  +                INHERITED_CLASS_OPT,
  +                "look for allowed methods in inherited class"),
   //        there is no implementation for a class loader
   //        look at todo in Emitter
   //        new CLOptionDescriptor("classDir",
  @@ -190,6 +195,10 @@
   
                       case METHODS_ALLOWED_OPT:
                           emitter.setAllowedMethods(option.getArgument());
  +                        break;
  +
  +                    case INHERITED_CLASS_OPT:
  +                        emitter.setUseInheritedMethods(true);
                           break;
   
                       case HELP_OPT:
  
  
  

Mime
View raw message