axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r149399 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/impl/llom/OMElementImpl.java java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java test/org/apache/axis/om/OMNavigatorTest.java
Date Tue, 01 Feb 2005 14:11:27 GMT
Author: ajith
Date: Tue Feb  1 06:11:23 2005
New Revision: 149399

URL: http://svn.apache.org/viewcvs?view=rev&rev=149399
Log:
fixed a serializer bug

Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java?view=diff&r1=149398&r2=149399
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
Tue Feb  1 06:11:23 2005
@@ -453,9 +453,15 @@
                 if (writer_prefix!=null){
                     writer.writeStartElement(nameSpaceName, this.getLocalName());
                 }else{
-                    writer.writeStartElement(prefix,nameSpaceName, this.getLocalName());
-                    writer.writeNamespace(prefix, nameSpaceName);
-                    writer.setPrefix(prefix,nameSpaceName);
+                    if (prefix!=null){
+                        writer.writeStartElement(prefix, this.getLocalName(),nameSpaceName);
+                        writer.writeNamespace(prefix, nameSpaceName);
+                        writer.setPrefix(prefix,nameSpaceName);
+                    }else{
+                        writer.writeStartElement(nameSpaceName,this.getLocalName());
+                        writer.writeDefaultNamespace(nameSpaceName);
+                        writer.setDefaultNamespace(nameSpaceName);
+                    }
                 }
 
             } else {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java?view=diff&r1=149398&r2=149399
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/StreamingOMSerializer.java
Tue Feb  1 06:11:23 2005
@@ -87,9 +87,15 @@
             if (writer_prefix!=null){
                 writer.writeStartElement(nameSpaceName, reader.getLocalName());
             }else{
-                writer.writeStartElement(prefix,nameSpaceName, reader.getLocalName());
-                writer.writeNamespace(prefix, nameSpaceName);
-                writer.setPrefix(prefix,nameSpaceName);
+                if (prefix!=null){
+                        writer.writeStartElement(prefix, reader.getLocalName(),nameSpaceName);
+                        writer.writeNamespace(prefix, nameSpaceName);
+                        writer.setPrefix(prefix,nameSpaceName);
+                    }else{
+                        writer.writeStartElement(nameSpaceName,reader.getLocalName());
+                        writer.writeDefaultNamespace(nameSpaceName);
+                        writer.setDefaultNamespace(nameSpaceName);
+                    }
             }
         } else {
             throw new OMException("Non namespace qualified elements are not allowed");

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java?view=diff&r1=149398&r2=149399
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/OMNavigatorTest.java
Tue Feb  1 06:11:23 2005
@@ -46,6 +46,7 @@
         envelope = (SOAPEnvelope)builder.getDocumentElement();
         tempFile = File.createTempFile("temp", "xml");
         writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile));
+//        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
 
 
     }
@@ -102,6 +103,7 @@
     }
 
     protected void tearDown() throws Exception {
+        writer.flush();
         tempFile.delete();
     }
 



Mime
View raw message