You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/07/27 05:16:09 UTC

cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser/castor CastorDeserializerFactory.java CastorEnumTypeDeserializerFactory.java CastorEnumTypeSerializerFactory.java CastorSerializer.java CastorSerializerFactory.java

dims        2005/07/26 20:16:09

  Modified:    java/src/org/apache/axis/encoding/ser/castor
                        CastorDeserializerFactory.java
                        CastorEnumTypeDeserializerFactory.java
                        CastorEnumTypeSerializerFactory.java
                        CastorSerializer.java CastorSerializerFactory.java
  Log:
  Fix for  AXIS-2135 - CastorSerializer 1.2/1.2.1 does not handle arrays correctly
  from Dmitry Vasilenko
  
  Revision  Changes    Path
  1.5       +3 -0      ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorDeserializerFactory.java
  
  Index: CastorDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorDeserializerFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CastorDeserializerFactory.java	25 Feb 2004 14:02:39 -0000	1.4
  +++ CastorDeserializerFactory.java	27 Jul 2005 03:16:09 -0000	1.5
  @@ -30,4 +30,7 @@
       public CastorDeserializerFactory(Class javaType, QName xmlType) {
           super(CastorDeserializer.class, xmlType, javaType);
       }
  +    public static DeserializerFactory create(Class javaType, QName xmlType) {
  +        return new CastorDeserializerFactory(javaType, xmlType);
  +    }
   }
  
  
  
  1.3       +3 -0      ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorEnumTypeDeserializerFactory.java
  
  Index: CastorEnumTypeDeserializerFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorEnumTypeDeserializerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CastorEnumTypeDeserializerFactory.java	25 Feb 2004 14:02:39 -0000	1.2
  +++ CastorEnumTypeDeserializerFactory.java	27 Jul 2005 03:16:09 -0000	1.3
  @@ -30,4 +30,7 @@
       public CastorEnumTypeDeserializerFactory(Class javaType, QName xmlType) {
           super(CastorEnumTypeDeserializer.class, xmlType, javaType);
       }
  +    public static DeserializerFactory create(Class javaType, QName xmlType) {
  +        return new CastorEnumTypeDeserializerFactory(javaType, xmlType);
  +    }
   }
  
  
  
  1.3       +3 -0      ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorEnumTypeSerializerFactory.java
  
  Index: CastorEnumTypeSerializerFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorEnumTypeSerializerFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CastorEnumTypeSerializerFactory.java	25 Feb 2004 14:02:39 -0000	1.2
  +++ CastorEnumTypeSerializerFactory.java	27 Jul 2005 03:16:09 -0000	1.3
  @@ -29,4 +29,7 @@
       public CastorEnumTypeSerializerFactory(Class javaType, QName xmlType) {
           super(CastorEnumTypeSerializer.class, xmlType, javaType);
       }
  +    public static SerializerFactory create(Class javaType, QName xmlType) {
  +        return new CastorEnumTypeSerializerFactory(javaType, xmlType);
  +    }
   }
  
  
  
  1.9       +6 -2      ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorSerializer.java
  
  Index: CastorSerializer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorSerializer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CastorSerializer.java	15 Mar 2005 22:33:36 -0000	1.8
  +++ CastorSerializer.java	27 Jul 2005 03:16:09 -0000	1.9
  @@ -106,8 +106,12 @@
               //2 DOCTYPE defined in the document. The XML fragment is included in
               //an XML document containing already a DOCTYPE
               marshaller.setMarshalAsDocument(false);
  -            marshaller.setRootElement(name.getLocalPart());
  -            
  +            String localPart = name.getLocalPart();
  +            int arrayDims = localPart.indexOf('[');
  +            if (arrayDims != -1) {
  +                localPart = localPart.substring(0, arrayDims);
  +            }
  +            marshaller.setRootElement(localPart);
               // Marshall the Castor object into the stream (sink)
               marshaller.marshal(value);
           } catch (MarshalException me) {
  
  
  
  1.5       +3 -0      ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorSerializerFactory.java
  
  Index: CastorSerializerFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/castor/CastorSerializerFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CastorSerializerFactory.java	25 Feb 2004 14:02:39 -0000	1.4
  +++ CastorSerializerFactory.java	27 Jul 2005 03:16:09 -0000	1.5
  @@ -29,4 +29,7 @@
       public CastorSerializerFactory(Class javaType, QName xmlType) {
           super(CastorSerializer.class, xmlType, javaType);
       }
  +    public static SerializerFactory create(Class javaType, QName xmlType) {
  +        return new CastorSerializerFactory(javaType, xmlType);
  +    }
   }