axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r193172 - in /webservices/axis/trunk/java/modules/xml: src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java test/org/apache/axis/om/OMNavigatorTest.java test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java
Date Thu, 23 Jun 2005 15:52:09 GMT
Author: thilina
Date: Thu Jun 23 08:52:09 2005
New Revision: 193172

URL: http://svn.apache.org/viewcvs?rev=193172&view=rev
Log: (empty)

Modified:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java?rev=193172&r1=193171&r2=193172&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
(original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
Thu Jun 23 08:52:09 2005
@@ -7,6 +7,7 @@
 import org.apache.axis.soap.SOAPFault;
 import org.apache.axis.om.*;
 import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axis.om.impl.llom.OMOutputer;
 import org.apache.axis.om.impl.llom.OMSerializerUtil;
 
 import javax.xml.namespace.QName;
@@ -73,7 +74,7 @@
         }
     }
 
-    protected void serialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
{
+    protected void serialize(OMOutputer outputer, boolean cache) throws XMLStreamException
{
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -82,10 +83,10 @@
         }
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(writer));
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(outputer));
         }
 
-
+        XMLStreamWriter writer = outputer.getXmlStreamWriter();
         if (this.getNamespace() != null) {
            String prefix = this.getNamespace().getPrefix();
         String nameSpaceName = this.getNamespace().getName();
@@ -95,8 +96,8 @@
             writer.writeStartElement(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
         }
 
-        OMSerializerUtil.serializeAttributes(this, writer);
-        OMSerializerUtil.serializeNamespaces(this, writer);
+        OMSerializerUtil.serializeAttributes(this, outputer);
+        OMSerializerUtil.serializeNamespaces(this, outputer);
 
 
         String text = this.getValue().getText();
@@ -105,7 +106,7 @@
 
         //serilize siblings
             if (this.nextSibling != null) {
-                nextSibling.serialize(writer);
+                nextSibling.serialize(outputer);
             } else if (this.parent != null) {
                 if (!this.parent.isComplete()) {
                     builder.setCache(cache);

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java?rev=193172&r1=193171&r2=193172&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java Thu
Jun 23 08:52:09 2005
@@ -16,6 +16,7 @@
 package org.apache.axis.om;
 
 import org.apache.axis.om.impl.llom.OMNavigator;
+import org.apache.axis.om.impl.llom.OMOutputer;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
@@ -32,7 +33,7 @@
     private SOAPEnvelope envelope = null;
     private OMXMLParserWrapper builder;
     private File tempFile;
-    private XMLStreamWriter writer;
+    private OMOutputer outputer;
 
     public OMNavigatorTest(String testName) {
         super(testName);
@@ -45,7 +46,7 @@
         builder = new StAXSOAPModelBuilder(xmlStreamReader);
         envelope = (SOAPEnvelope) builder.getDocumentElement();
         tempFile = File.createTempFile("temp", "xml");
-        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile));
+        outputer = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(new
FileOutputStream(tempFile)));
         //        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
 
 
@@ -54,7 +55,7 @@
     public void testnavigatorFullyBuilt() throws Exception {
         assertNotNull(envelope);
         //dump the out put to a  temporary file
-        envelope.serializeWithCache(writer);
+        envelope.serializeWithCache(outputer);
 
         //now the OM is fully created test the navigation
         OMNavigator navigator = new OMNavigator(envelope);
@@ -97,7 +98,7 @@
     }
 
     protected void tearDown() throws Exception {
-        writer.flush();
+        outputer.flush();
         tempFile.delete();
     }
 

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java?rev=193172&r1=193171&r2=193172&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java
(original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java
Thu Jun 23 08:52:09 2005
@@ -1,6 +1,7 @@
 package org.apache.axis.soap.impl.llom.soap11;
 
 import org.apache.axis.om.OMTestCase;
+import org.apache.axis.om.impl.llom.OMOutputer;
 import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
 import org.apache.axis.soap.SOAPEnvelope;
 
@@ -27,7 +28,7 @@
  */
 
 public class SOAP11SerialiserTest extends OMTestCase{
-    private XMLStreamWriter writer;
+    private OMOutputer omOutput;
 
     public SOAP11SerialiserTest(String testName) {
         super(testName);
@@ -40,19 +41,19 @@
     protected void setUp() throws Exception {
         super.setUp();
         soapEnvelope = (SOAPEnvelope) getOMBuilder("soap/soap11fault.xml").getDocumentElement();
-        writer = XMLOutputFactory.newInstance().
-                createXMLStreamWriter(System.out);
+        omOutput = new OMOutputer(XMLOutputFactory.newInstance().
+                createXMLStreamWriter(System.out));
     }
 
     public void testSerialise(){
         try {
-            soapEnvelope.serializeWithCache(writer);
-            writer.flush();
+            soapEnvelope.serializeWithCache(omOutput);
+            omOutput.flush();
 
             System.out.println("");
             System.out.println("=======================");
-            soapEnvelope.serialize(writer);
-            writer.flush();
+            soapEnvelope.serialize(omOutput);
+            omOutput.flush();
         } catch (XMLStreamException e) {
             e.printStackTrace();
         }



Mime
View raw message