axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl/roundtrip BondInvestment.java
Date Fri, 01 Mar 2002 18:38:31 GMT
scheu       02/03/01 10:38:31

  Modified:    java/src/org/apache/axis/wsdl/fromJava ClassRep.java
               java/test/wsdl Wsdl2javaTestSuite.xml
               java/test/wsdl/roundtrip BondInvestment.java
  Log:
  Fixed a bug in Java2WSDL related to the detection of indexed properties.
  This may the cause of the problem reported by Dave Dunkin on axis-user.
  
  Added a indexed property to the roundtrip test to verify processing.
  (Added options indexed property to BondInvestment.java)
  
  Revision  Changes    Path
  1.19      +5 -2      xml-axis/java/src/org/apache/axis/wsdl/fromJava/ClassRep.java
  
  Index: ClassRep.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/ClassRep.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ClassRep.java	27 Feb 2002 20:31:10 -0000	1.18
  +++ ClassRep.java	1 Mar 2002 18:38:31 -0000	1.19
  @@ -365,6 +365,7 @@
               Method method = cls.getDeclaredMethods()[i];
               int mod = method.getModifiers();
               if (Modifier.isPublic(mod) &&
  +                method.getParameterTypes().length == 0 &&
                   (method.getName().startsWith("is") ||
                    method.getName().startsWith("get"))) {
                   String name = method.getName();
  @@ -798,13 +799,14 @@
               else
                   getter = "get" + propName;
   
  -            Method m = type.getDeclaredMethod(setter, new Class[] {int.class, type.getComponentType()});
  +            Method m = cls.getDeclaredMethod(setter, new Class[] {int.class, type.getComponentType()});
               int mod = m.getModifiers();
               if (!Modifier.isPublic(mod)) {
                   return false;
               }
   
  -            m = type.getDeclaredMethod(getter, new Class[] {int.class});
  +            System.out.println("getter=" + setter);
  +            m = cls.getDeclaredMethod(getter, new Class[] {int.class});
               mod = m.getModifiers();
               if (!Modifier.isPublic(mod)) {
                   return false;
  @@ -813,6 +815,7 @@
           catch (NoSuchMethodException ex) {
               return false;
           }
  +        System.out.println("indexed property");
           return true;
       }
   };
  
  
  
  1.83      +2 -1      xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- Wsdl2javaTestSuite.xml	27 Feb 2002 22:57:42 -0000	1.82
  +++ Wsdl2javaTestSuite.xml	1 Mar 2002 18:38:31 -0000	1.83
  @@ -134,6 +134,8 @@
                  location="http://localhost:8080/axis/services/RoundtripTest">
           <mapping namespace="http://roundtrip.wsdl.test" package="test.wsdl.roundtrip"/>
       </java2wsdl>
  +
  + 
       <!-- Delete the intermediate files so we recreate over a clean slate -->
       <delete dir="${build.dir}/classes/test/wsdl/roundtrip"/>
       <!-- Recreate Java files from the new WSDL -->
  @@ -146,7 +148,6 @@
                  testcase="no">
           <mapping namespace="http://roundtrip.wsdl.test" package="test.wsdl.roundtrip"/>
       </wsdl2java>
  -
       <!-- Sequence Test -->
       <!-- Generate Java From WSDL -->
       <wsdl2java url="test/wsdl/sequence/SequenceTest.wsdl"
  
  
  
  1.3       +27 -1     xml-axis/java/test/wsdl/roundtrip/BondInvestment.java
  
  Index: BondInvestment.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/roundtrip/BondInvestment.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BondInvestment.java	22 Feb 2002 23:11:35 -0000	1.2
  +++ BondInvestment.java	1 Mar 2002 18:38:31 -0000	1.3
  @@ -92,7 +92,7 @@
       private Double wrapperDouble;
       public Byte[] wrapperByteArray;
       public Short[] wrapperShortArray;
  -    public CallOptions[] options;
  +    private CallOptions[] options;
   
       public BondInvestment() {
   
  @@ -167,4 +167,30 @@
       public static java.lang.String[] getAttributeElements() {
           return _attrs;
       }
  + 
  +    public CallOptions getOptions(int i) {
  +        return options[i];
  +    }
  +
  +    public void setOptions(int i, CallOptions value) {
  +        if (options == null ||
  +            options.length <= i) {
  +            CallOptions[] a = new CallOptions[i + 1];
  +            if (options != null) {
  +                for(int j=0; j<options.length; j++)
  +                    a[j] = options[j];
  +            }
  +            options = a;
  +        }
  +        options[i] = value;
  +    }
  +
  +    public CallOptions[] getOptions() {
  +        return options;
  +    }
  +
  +    public void setOptions(CallOptions[] options) {
  +        this.options = options;
  +    }
  +
   } // BondInvestment 
  
  
  

Mime
View raw message