axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava Types.java
Date Tue, 11 Jan 2005 16:44:54 GMT
gdaniels    2005/01/11 08:44:53

  Modified:    java/src/org/apache/axis/encoding/ser ArraySerializer.java
               java/src/org/apache/axis/wsdl/fromJava Types.java
  Log:
  When writing WSDL, a) use maxOccurs="unbounded" for literal arrays, and
  b) fix a bug where we were writing encoded-style arrays when in doc/lit
  mode.
  
  Revision  Changes    Path
  1.63      +5 -4      ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java
  
  Index: ArraySerializer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- ArraySerializer.java	23 Nov 2004 01:29:16 -0000	1.62
  +++ ArraySerializer.java	11 Jan 2005 16:44:53 -0000	1.63
  @@ -445,12 +445,13 @@
           }
           
           if (!encoded) {
  +            Class cType = Object.class;
               if (javaType.isArray()) {
  -                Class cType = javaType.getComponentType();
  -                String typeName = types.writeType(cType);
  -                
  -                return types.createLiteralArrayElement(typeName, null);
  +                cType = javaType.getComponentType();
               }
  +
  +            String typeName = types.writeType(cType);
  +            return types.createLiteralArrayElement(typeName, null);
           }
           
           // If an array the component type should be processed first
  
  
  
  1.107     +4 -0      ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
  
  Index: Types.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- Types.java	10 Jan 2005 19:02:30 -0000	1.106
  +++ Types.java	11 Jan 2005 16:44:53 -0000	1.107
  @@ -1193,6 +1193,10 @@
               element.setAttribute("maxOccurs", "1");
           }
   
  +        if (javaType.isArray()) {
  +            element.setAttribute("maxOccurs", "unbounded");
  +        }
  +
           // Write the type for this element, handling anonymous or named
           // types appropriately.
           makeTypeElement(javaType, typeQName, element);
  
  
  

Mime
View raw message