axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/test/encoding TestDOM.java
Date Tue, 04 Dec 2001 16:01:03 GMT
dims        01/12/04 08:01:03

  Modified:    java/src/org/apache/axis/encoding SerializationContext.java
               java/test/encoding TestDOM.java
  Log:
  - Fix for SOAPBodyElement serialization bug (Attributes null problem) reported by "David
Melgar <dmelgar@us.ibm.com>"
  
  Revision  Changes    Path
  1.68      +2 -0      xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java
  
  Index: SerializationContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- SerializationContext.java	2001/12/04 13:31:34	1.67
  +++ SerializationContext.java	2001/12/04 16:01:03	1.68
  @@ -503,6 +503,8 @@
                       }
                   } else {
                       qname = attributes.getLocalName(i);
  +                    if(qname == null)
  +                        qname = attributes.getQName(i);
                   }
   
                   writer.write(qname);
  
  
  
  1.8       +10 -0     xml-axis/java/test/encoding/TestDOM.java
  
  Index: TestDOM.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDOM.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestDOM.java	2001/12/04 13:31:34	1.7
  +++ TestDOM.java	2001/12/04 16:01:03	1.8
  @@ -112,10 +112,20 @@
           SOAPBodyElement body = new SOAPBodyElement(XMLUtils.newDocument().createElement("tmp"));
           assertEquals("<tmp/>",body.toString());
       }
  +
  +    public void testNodeWithAttribute() throws Exception 
  +    {
  +        org.w3c.dom.Element element = XMLUtils.newDocument().createElement("tmp");
  +        element.setAttribute("attrib", "foo");
  +        SOAPBodyElement body = new SOAPBodyElement(element);
  +        assertEquals("<tmp attrib=\"foo\"/>",body.toString());
  +    }
       
       public static void main(String [] args) throws Exception
       {
           TestDOM tester = new TestDOM("TestDOM");
  +        tester.testNodeWithAttribute();
  +        tester.testEmptyNode();
           tester.testDOM();
       }
   
  
  
  

Mime
View raw message