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/test/functional TestEncoding.java
Date Sat, 29 Nov 2003 05:15:03 GMT
gdaniels    2003/11/28 21:15:03

  Modified:    java/src/org/apache/axis/encoding/ser BeanSerializer.java
               java/test/functional TestEncoding.java
  Log:
  Fix bug 22999.
  
  Pass metadata down to getValueAsString for attributes, so we serialize
  them correctly.
  
  Also fix up TestEncoding so it works with older versions of junit.
  
  Revision  Changes    Path
  1.68      +7 -3      ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
  
  Index: BeanSerializer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- BeanSerializer.java	24 Nov 2003 20:54:47 -0000	1.67
  +++ BeanSerializer.java	29 Nov 2003 05:15:02 -0000	1.68
  @@ -535,7 +535,11 @@
                       // the attribute may be more sophisticated.  For example, don't
                       // serialize if the attribute matches the default value.
                       if (propValue != null) {
  -                        setAttributeProperty(propValue, qname, attrs, context);
  +                        setAttributeProperty(propValue,
  +                                             qname,
  +                                             field.getXmlType(), 
  +                                             attrs,
  +                                             context);
                       }
                   }
               }
  @@ -549,9 +553,9 @@
   
       private void setAttributeProperty(Object propValue,
                                         QName qname,
  -                                      AttributesImpl attrs,
  +                                      QName xmlType, AttributesImpl attrs,
                                         SerializationContext context) throws Exception {
  -        String propString = context.getValueAsString(propValue, null);
  +        String propString = context.getValueAsString(propValue, xmlType);
           String namespace = qname.getNamespaceURI();
           String localName = qname.getLocalPart();
   
  
  
  
  1.2       +4 -0      ws-axis/java/test/functional/TestEncoding.java
  
  Index: TestEncoding.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/functional/TestEncoding.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestEncoding.java	26 Nov 2003 17:16:41 -0000	1.1
  +++ TestEncoding.java	29 Nov 2003 05:15:03 -0000	1.2
  @@ -13,6 +13,10 @@
   public class TestEncoding extends TestCase {
       Call call = null;
   
  +    public TestEncoding(String s) {
  +        super(s);
  +    }
  +
       protected void setUp() throws Exception {
           if (call == null) {
               Service service = new Service();
  
  
  

Mime
View raw message