axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r201563 [1/2] - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/transport/ core/src/org/apache/axis/transport/http/ saaj/src/org/apache/axis/saaj/ samples/src/sample/amazon/search/ samples/src/userguide/clients/ samples/te...
Date Fri, 24 Jun 2005 04:23:46 GMT
Author: thilina
Date: Thu Jun 23 21:23:43 2005
New Revision: 201563

URL: http://svn.apache.org/viewcvs?rev=201563&view=rev
Log:
Renaming OMOutputer.java to OMOutput.java. And Refactoring the others accordingly.

Added:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutput.java
Removed:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutputer.java
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPMessageImpl.java
    webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java
    webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientCallbackHandler.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLLoadTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsSyncTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MailEchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/rest/RESTBasedEchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPEchoRawXMLTest.java
    webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPTwoChannelEchoRawXMLTest.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMNode.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMSerializer.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMTextImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/OMNavigatorTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/SOAPFaultTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/ElementSerializerTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/OMSerailizerTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
    webservices/axis/trunk/java/modules/xml/test/org/apache/axis/soap/impl/llom/soap11/SOAP11SerialiserTest.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/AbstractTransportSender.java Thu Jun 23 21:23:43 2005
@@ -29,7 +29,7 @@
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.handlers.AbstractHandler;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -109,11 +109,11 @@
         }
 
         if (outputMessage != null) {
-            OMOutputer outputer = null;
+            OMOutput omOutput = null;
             try {
-                outputer = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(out));
-                outputMessage.serialize(outputer);
-                outputer.flush();
+                omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(out));
+                outputMessage.serialize(omOutput);
+                omOutput.flush();
                 out.flush();
 
             } catch (Exception e) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Thu Jun 23 21:23:43 2005
@@ -45,7 +45,7 @@
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMException;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.builder.StAXBuilder;
 import org.apache.axis.om.impl.llom.builder.StAXOMBuilder;
 import org.apache.axis.soap.SOAPEnvelope;
@@ -110,9 +110,9 @@
 
             SOAPEnvelope envelope = HTTPTransportUtils.createEnvelopeFromGetRequest(filePart, map);
             if (envelope != null) {
-                OMOutputer outputer =
-                    new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
-                envelope.serialize(outputer);
+                OMOutput omOutput =
+                    new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+                envelope.serialize(omOutput);
                 System.out.flush();
                 Object sessionContext =
                     httpServletRequest.getSession().getAttribute(

Modified: webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPMessageImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPMessageImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPMessageImpl.java (original)
+++ webservices/axis/trunk/java/modules/saaj/src/org/apache/axis/saaj/SOAPMessageImpl.java Thu Jun 23 21:23:43 2005
@@ -28,7 +28,7 @@
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.transport.http.HTTPConstants;
 
 /**
@@ -196,9 +196,9 @@
 	 */
 	public void writeTo(OutputStream out) throws SOAPException, IOException {
 		try{
-		OMOutputer outputer = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(out));
-		((SOAPEnvelopeImpl)mSOAPPart.getEnvelope()).getOMEnvelope().serialize(outputer);
-		outputer.flush();
+		OMOutput omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(out));
+		((SOAPEnvelopeImpl)mSOAPPart.getEnvelope()).getOMEnvelope().serialize(omOutput);
+		omOutput.flush();
 		} catch(Exception e){
 			throw new SOAPException(e);
 		}

Modified: webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java Thu Jun 23 21:23:43 2005
@@ -29,7 +29,7 @@
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.clientapi.Call;
 import org.apache.axis.engine.AxisFault;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
@@ -156,7 +156,7 @@
 
             System.out.println("Sending the Async message ....");
 
-           OMOutputer omOutput = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter
+           OMOutput omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter
                     (System.out));
             requestContext.getEnvelope().serialize(omOutput);
             omOutput.flush();

Modified: webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientCallbackHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientCallbackHandler.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientCallbackHandler.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/amazon/search/ClientCallbackHandler.java Thu Jun 23 21:23:43 2005
@@ -20,7 +20,7 @@
 import org.apache.axis.clientapi.Callback;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMNode;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 
 import javax.xml.stream.FactoryConfigurationError;
@@ -68,9 +68,9 @@
     public void onComplete(AsyncResult result) {
          System.out.println("Responce message received to the ClientCallbackHandler ...");
         try {
-            OMOutputer outputer = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
-            result.getResponseEnvelope().serialize(outputer);
-            outputer.flush();
+            OMOutput omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+            result.getResponseEnvelope().serialize(omOutput);
+            omOutput.flush();
         } catch (XMLStreamException e) {
             System.out.println("Error occured after responce is received");
             e.printStackTrace();

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java Thu Jun 23 21:23:43 2005
@@ -6,7 +6,7 @@
 import org.apache.axis.clientapi.Call;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -43,7 +43,7 @@
             OMElement result = (OMElement) call.invokeBlocking("echo", payload);
 
             StringWriter writer = new StringWriter();
-            result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
+            result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
             writer.flush();
 
             System.out.println(writer.toString());

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java Thu Jun 23 21:23:43 2005
@@ -6,7 +6,7 @@
 import org.apache.axis.clientapi.Call;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -43,7 +43,7 @@
             OMElement result = (OMElement) call.invokeBlocking("echo", payload);
 
             StringWriter writer = new StringWriter();
-            result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
+            result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
             writer.flush();
 
             System.out.println(writer.toString());

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java Thu Jun 23 21:23:43 2005
@@ -6,7 +6,7 @@
 import org.apache.axis.clientapi.Call;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
@@ -38,7 +38,7 @@
             OMElement result = (OMElement) call.invokeBlocking("echo", payload);
 
             StringWriter writer = new StringWriter();
-            result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
+            result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
             writer.flush();
 
             System.out.println(writer.toString());

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java Thu Jun 23 21:23:43 2005
@@ -8,7 +8,7 @@
 import org.apache.axis.clientapi.Callback;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
@@ -37,7 +37,7 @@
                 public void onComplete(AsyncResult result) {
                     try {
                         StringWriter writer = new StringWriter();
-                        result.getResponseEnvelope().serializeWithCache(new OMOutputer(
+                        result.getResponseEnvelope().serializeWithCache(new OMOutput(
                                 XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
                         writer.flush();
 

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java Thu Jun 23 21:23:43 2005
@@ -8,7 +8,7 @@
 import org.apache.axis.clientapi.Callback;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMElement;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
@@ -43,7 +43,7 @@
                     try {
                         StringWriter writer = new StringWriter();
                         result.getResponseEnvelope().serializeWithCache(
-                               new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
+                               new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
                         writer.flush();
 
                         System.out.println(writer.toString());

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLLoadTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLLoadTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLLoadTest.java Thu Jun 23 21:23:43 2005
@@ -34,7 +34,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.util.Utils;
 import org.apache.commons.logging.Log;
@@ -151,7 +151,7 @@
         OMElement result1 =
                         (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
         
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         call.close();
     }
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsSyncTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsSyncTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsSyncTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsSyncTest.java Thu Jun 23 21:23:43 2005
@@ -32,7 +32,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.transport.http.SimpleHTTPServer;
@@ -120,7 +120,7 @@
         call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, true);
 
         OMElement result = (OMElement) call.invokeBlocking(operationName.getLocalPart(), method);
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         call.close();
 
     }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLOnTwoChannelsTest.java Thu Jun 23 21:23:43 2005
@@ -35,7 +35,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.transport.http.SimpleHTTPServer;
@@ -130,7 +130,7 @@
                 public void onComplete(AsyncResult result) {
                     try {
                         result.getResponseEnvelope().serialize(
-                            new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                            new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
                     } catch (XMLStreamException e) {
                         reportError(e);
                     } finally {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -37,7 +37,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.util.Utils;
 import org.apache.commons.logging.Log;
@@ -110,7 +110,7 @@
         Callback callback = new Callback() {
             public void onComplete(AsyncResult result) {
                 try {
-                    result.getResponseEnvelope().serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                    result.getResponseEnvelope().serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
                 } catch (XMLStreamException e) {
                     reportError(e);
                 } finally {
@@ -151,7 +151,7 @@
 
         OMElement result =
                 (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         call.close();
     }
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/HandlerFailureTest.java Thu Jun 23 21:23:43 2005
@@ -36,7 +36,7 @@
 import org.apache.axis.om.OMAbstractFactory;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.phaseresolver.PhaseMetadata;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.transport.http.SimpleHTTPServer;
@@ -156,7 +156,7 @@
             call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP,false);
             call.setTo(targetEPR);
             OMElement result = call.invokeBlocking(operationName.getLocalPart(),method);
-            OMOutputer omOutput = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+            OMOutput omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
             result.serialize(omOutput);
            omOutput.flush();
             fail("the test must fail due to bad service Name");

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MailEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MailEchoRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MailEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/MailEchoRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -34,7 +34,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.util.Utils;
 import org.apache.commons.logging.Log;
@@ -146,7 +146,7 @@
 
         OMElement result =
                 (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         call.close();
     }
     

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/mail/MailRequestResponseRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -46,7 +46,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.transport.mail.MailTransportSender;
 import org.apache.axis.transport.mail.SimpleMailListener;
@@ -135,7 +135,7 @@
                 public void onComplete(AsyncResult result) {
                     try {
                         result.getResponseEnvelope().serialize(
-                            new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                            new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
                     } catch (XMLStreamException e) {
                         reportError(e);
                     } finally {

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/rest/RESTBasedEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/rest/RESTBasedEchoRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/rest/RESTBasedEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/rest/RESTBasedEchoRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -39,7 +39,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.util.Utils;
 import org.apache.commons.logging.Log;
@@ -202,7 +202,7 @@
         call.set(Constants.Configuration.DO_REST,"true");
         OMElement result =
                 (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         
         System.out.println(messageInfo.requestMessage);
         call.close();

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPEchoRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPEchoRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -40,7 +40,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.transport.http.SimpleHTTPServer;
 import org.apache.axis.util.Utils;
@@ -116,7 +116,7 @@
         Callback callback = new Callback() {
             public void onComplete(AsyncResult result) {
                 try {
-                    result.getResponseEnvelope().serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                    result.getResponseEnvelope().serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
                 } catch (XMLStreamException e) {
                     reportError(e);
                 } finally {
@@ -155,7 +155,7 @@
 
         OMElement result =
                 (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
-        result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
         call.close();
     }
     
@@ -180,7 +180,7 @@
           call.setTransportInfo(Constants.TRANSPORT_TCP, Constants.TRANSPORT_TCP, true);
 
           OMElement result = (OMElement) call.invokeBlocking(operationName.getLocalPart(), method);
-          result.serializeWithCache(new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+          result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
           call.close();
 
       }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPTwoChannelEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPTwoChannelEchoRawXMLTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPTwoChannelEchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/tcp/TCPTwoChannelEchoRawXMLTest.java Thu Jun 23 21:23:43 2005
@@ -40,7 +40,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.transport.http.SimpleHTTPServer;
 import org.apache.axis.util.Utils;
 
@@ -130,7 +130,7 @@
                     public void onComplete(AsyncResult result) {
                         try {
                             result.getResponseEnvelope().serialize(
-                                new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                                new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
                         } catch (XMLStreamException e) {
                             reportError(e);
                         } finally {

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMNode.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMNode.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMNode.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMNode.java Thu Jun 23 21:23:43 2005
@@ -18,7 +18,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 /**
  * Interface OMNode
@@ -155,7 +155,7 @@
      * @param writer
      * @throws XMLStreamException
      */
-    public void serializeWithCache(OMOutputer outputer)
+    public void serializeWithCache(OMOutput omOutput)
         throws XMLStreamException;
 
     /**
@@ -164,7 +164,7 @@
      * @param writer
      * @throws XMLStreamException
      */
-    public void serialize(OMOutputer outputer) throws XMLStreamException;
+    public void serialize(OMOutput omOutput) throws XMLStreamException;
 
     /**
      * Builds itself

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMSerializer.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMSerializer.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/OMSerializer.java Thu Jun 23 21:23:43 2005
@@ -18,7 +18,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 /**
  * Interface OMSerializer
@@ -31,6 +31,6 @@
      * @param writer
      * @throws XMLStreamException
      */
-    void serialize(Object obj, OMOutputer outputer)
+    void serialize(Object obj, OMOutput omOutput)
             throws XMLStreamException;
 }

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMElementImpl.java Thu Jun 23 21:23:43 2005
@@ -620,14 +620,14 @@
      * @param writer
      * @throws XMLStreamException
      */
-    public void serializeWithCache(OMOutputer outputer)  throws XMLStreamException {
-        serialize(outputer,true);
+    public void serializeWithCache(OMOutput omOutput)  throws XMLStreamException {
+        serialize(omOutput,true);
     }
 
     ///////////////////////////////////////////////////////////////////////////////////////////////
     //////////////////////////////////////////////////////////////////////////////////////////////
 
-    private void serialize(OMOutputer outputer,boolean cache)throws XMLStreamException {
+    private void serialize(OMOutput omOutput,boolean cache)throws XMLStreamException {
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -637,32 +637,32 @@
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
             builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(outputer));
+                    new StreamWriterToContentHandlerConverter(omOutput));
         }
 
 
         if (!cache) {
             //No caching
             if (this.firstChild!=null){
-                OMSerializerUtil.serializeStartpart(this,outputer);
-                firstChild.serialize(outputer);
-                OMSerializerUtil.serializeEndpart(outputer);
+                OMSerializerUtil.serializeStartpart(this,omOutput);
+                firstChild.serialize(omOutput);
+                OMSerializerUtil.serializeEndpart(omOutput);
             }else if (!this.done){
                 if (builderType==PULL_TYPE_BUILDER){
-                    OMSerializerUtil.serializeByPullStream(this,outputer);
+                    OMSerializerUtil.serializeByPullStream(this,omOutput);
                 }else{
-                    OMSerializerUtil.serializeStartpart(this,outputer);
+                    OMSerializerUtil.serializeStartpart(this,omOutput);
                     builder.setCache(cache);
                     builder.next();
-                    OMSerializerUtil.serializeEndpart(outputer);
+                    OMSerializerUtil.serializeEndpart(omOutput);
                 }
             }else{
-                OMSerializerUtil.serializeNormal(this,outputer, cache);
+                OMSerializerUtil.serializeNormal(this,omOutput, cache);
             }
 
             //serilize siblings
             if (this.nextSibling != null) {
-                nextSibling.serialize(outputer);
+                nextSibling.serialize(omOutput);
             } else if (this.parent != null) {
                 if (!this.parent.done) {
                     builder.setCache(cache);
@@ -671,11 +671,11 @@
             }
         } else {
             //Cached
-            OMSerializerUtil.serializeNormal(this,outputer, cache);
+            OMSerializerUtil.serializeNormal(this,omOutput, cache);
             // serialize the siblings
             OMNode nextSibling = this.getNextSibling();
             if (nextSibling != null) {
-                nextSibling.serializeWithCache(outputer);
+                nextSibling.serializeWithCache(omOutput);
             }
         }
     }
@@ -692,8 +692,8 @@
      * @param writer
      * @throws XMLStreamException
      */
-    public void serialize(OMOutputer outputer) throws XMLStreamException {
-        this. serialize(outputer,false);
+    public void serialize(OMOutput omOutput) throws XMLStreamException {
+        this. serialize(omOutput,false);
     }
 
 

Added: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutput.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutput.java?rev=201563&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutput.java (added)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMOutput.java Thu Jun 23 21:23:43 2005
@@ -0,0 +1,218 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis.om.impl.llom;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import javax.activation.DataHandler;
+import javax.mail.MessagingException;
+import javax.mail.internet.ContentType;
+import javax.mail.internet.MimeBodyPart;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.om.OMText;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
+ * For the moment this assumes that transport takes the decision of whether to optimise or not
+ * by looking at whether the MTOM optimise is enabled & also looking at the OM tree whether it has any 
+ * optimisable content
+ */
+
+public class OMOutput {
+	private XMLStreamWriter xmlWriter;
+	
+	private boolean doOptimise;
+	
+	private OutputStream outStream;
+	
+	private byte[] CRLF = { 13, 10 };
+	
+	private XMLStreamWriter writer;
+	
+	private LinkedList binaryNodeList;
+	
+	private ByteArrayOutputStream bufferedSoapOutStream;
+	
+	private String mimeBoundary = null;
+	
+	private String SOAP_PART_CONTENT_ID = "<SOAPPart>";
+	
+	private ContentType contentType = null;
+	
+	/**
+	 * @param xmlWriter
+	 *            if it is guaranteed for not using attachments one can use this
+	 */
+	public OMOutput(XMLStreamWriter xmlWriter) {
+		this.xmlWriter = xmlWriter;
+	}
+	
+	/**
+	 * @throws FactoryConfigurationError
+	 * @throws XMLStreamException
+	 *  
+	 */
+	public OMOutput(OutputStream outStream, boolean doOptimise)
+	throws XMLStreamException, FactoryConfigurationError {
+		this.doOptimise = doOptimise;
+		this.outStream = outStream;
+		if (doOptimise) {
+			bufferedSoapOutStream = new ByteArrayOutputStream();
+			xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(
+					bufferedSoapOutStream);
+			binaryNodeList = new LinkedList();
+		} else {
+			xmlWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(
+					outStream);
+			
+		}
+		
+	}
+	
+	public XMLStreamWriter getXmlStreamWriter() {
+		return xmlWriter;
+	}
+	
+	public void flush() throws XMLStreamException {
+		if (doOptimise) {
+			try {
+				this.complete();
+			} catch (IOException e) {
+				//TODO this is just a hack to avoid passing IOException. Must find a better way to handle this
+				throw new XMLStreamException("Error creating mime parts. Problem with Streams");
+			} catch (MessagingException e) {
+				throw new XMLStreamException("Error creating mime Body parts");
+			} 
+		} else {
+			xmlWriter.flush();
+		}
+		
+	}
+	
+	public boolean doOptimise() {
+		return doOptimise;
+	}
+	
+	public String getContentType() {
+		if (contentType == null && doOptimise) {
+			contentType = new ContentType();
+			contentType.setPrimaryType("multipart");
+			contentType.setSubType("related");
+			contentType.setParameter("boundary", getMimeBoundary());
+			contentType.setParameter("start", SOAP_PART_CONTENT_ID);
+			contentType.setParameter("type", "application/xop+xml");
+			//TODO theres something called action that can be set with
+			// following. May be SOAPAction. Better check.
+			contentType.setParameter("startinfo", "application/xop+xml");
+		}
+		return contentType.toString();
+	}
+	
+	public void writeOptimised(OMText node) {
+		binaryNodeList.add(node);
+	}
+	
+	public void complete() throws IOException, MessagingException, XMLStreamException {
+		startWritingMime();
+		xmlWriter.flush();
+		DataHandler dh = new DataHandler(bufferedSoapOutStream.toString(),
+		"text/xml");
+		MimeBodyPart rootMimeBodyPart = new MimeBodyPart();
+		rootMimeBodyPart.setDataHandler(dh);
+		rootMimeBodyPart.addHeader("Content-Type", "application/xop+xml");
+		rootMimeBodyPart.addHeader("Content-Transfer-Encoding", "8bit");
+		rootMimeBodyPart.addHeader("Content-ID", SOAP_PART_CONTENT_ID);
+		
+		writeBodyPart(rootMimeBodyPart);
+		
+		Iterator binaryNodeIterator = binaryNodeList.iterator();
+		while (binaryNodeIterator.hasNext()) {
+			OMText binaryNode = (OMText) binaryNodeIterator.next();
+			writeBodyPart(createMimeBodyPart(binaryNode));
+		}
+		finishWritingMime();
+		
+	}
+	
+	private MimeBodyPart createMimeBodyPart(OMText node)
+	throws MessagingException {
+		MimeBodyPart mimeBodyPart = new MimeBodyPart();
+		mimeBodyPart.setDataHandler(node.getDataHandler());
+		mimeBodyPart.addHeader("Content-Transfer-Encoding", "binary");
+		mimeBodyPart.addHeader("Content-ID", "<" + node.getContentID() + ">");
+		return mimeBodyPart;
+		
+	}
+	
+	private String getMimeBoundary() {
+		//TODO have to dynamically generate.
+		if (mimeBoundary == null) {
+			mimeBoundary = "----=_AxIs2_Def_boundary_=42214532";
+		}
+		return mimeBoundary;
+	}
+	
+	/**
+	 * @throws IOException
+	 *             This will write the boundary to output Stream
+	 */
+	private void writeMimeBoundary() throws IOException {
+		outStream.write(new byte[] { 45, 45 });
+		outStream.write(getMimeBoundary().getBytes());
+	}
+	
+	/**
+	 * @throws IOException
+	 *             This will write the boundary with CRLF
+	 */
+	private void startWritingMime() throws IOException {
+		writeMimeBoundary();
+		outStream.write(CRLF);
+	}
+	
+	/**
+	 * this will write a CRLF for the earlier boudary then the BodyPart data
+	 * with headers followed by boundary. Writes only the boundary. No more
+	 * CRLF's are wriiting after that.
+	 * 
+	 * @throws IOException
+	 * @throws MessagingException
+	 */
+	private void writeBodyPart(MimeBodyPart part) throws IOException,
+	MessagingException {
+		outStream.write(CRLF);
+		part.writeTo(outStream);
+		outStream.write(CRLF);
+		writeMimeBoundary();
+	}
+	
+	/**
+	 * @throws IOException
+	 *             This will write "--" to the end of last boundary
+	 */
+	private void finishWritingMime() throws IOException {
+		outStream.write(new byte[] { 45, 45 });
+	}
+	
+}
\ No newline at end of file

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java Thu Jun 23 21:23:43 2005
@@ -35,9 +35,9 @@
      * @param writer
      * @throws javax.xml.stream.XMLStreamException
      */
-    static void serializeEndpart(OMOutputer outputer)
+    static void serializeEndpart(OMOutput omOutput)
             throws XMLStreamException {
-        outputer.getXmlStreamWriter().writeEndElement();
+        omOutput.getXmlStreamWriter().writeEndElement();
     }
 
     /**
@@ -47,14 +47,14 @@
      * @param writer
      * @throws XMLStreamException
      */
-    static void serializeAttribute(OMAttribute attr, OMOutputer outputer)
+    static void serializeAttribute(OMAttribute attr, OMOutput omOutput)
             throws XMLStreamException {
 
         // first check whether the attribute is associated with a namespace
         OMNamespace ns = attr.getNamespace();
         String prefix = null;
         String namespaceName = null;
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (ns != null) {
 
             // add the prefix if it's availble
@@ -79,11 +79,11 @@
      * @param writer
      * @throws XMLStreamException
      */
-    static void serializeNamespace(OMNamespace namespace,OMOutputer outputer)
+    static void serializeNamespace(OMNamespace namespace,OMOutput omOutput)
             throws XMLStreamException {
         
         if (namespace != null) {
-            XMLStreamWriter writer = outputer.getXmlStreamWriter();
+            XMLStreamWriter writer = omOutput.getXmlStreamWriter();
             String uri = namespace.getName();
             String prefix = writer.getPrefix(uri);
             String ns_prefix = namespace.getPrefix();
@@ -101,12 +101,12 @@
      * @param writer
      * @throws XMLStreamException
      */
-    static void serializeStartpart(OMElementImpl element,OMOutputer outputer)
+    static void serializeStartpart(OMElementImpl element,OMOutput omOutput)
             throws XMLStreamException {
         String nameSpaceName = null;
         String writer_prefix = null;
         String prefix = null;
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (element.ns != null) {
             nameSpaceName = element.ns.getName();
             writer_prefix = writer.getPrefix(nameSpaceName);
@@ -140,26 +140,26 @@
         }
 
         // add the elements attributes
-        serializeAttributes(element,outputer);
+        serializeAttributes(element,omOutput);
 
         // add the namespaces
-        serializeNamespaces(element, outputer);
+        serializeNamespaces(element, omOutput);
     }
 
-    public static void serializeNamespaces(OMElementImpl element, OMOutputer outputer) throws XMLStreamException {
+    public static void serializeNamespaces(OMElementImpl element, OMOutput omOutput) throws XMLStreamException {
         Iterator namespaces = element.getAllDeclaredNamespaces();
         if (namespaces != null) {
             while (namespaces.hasNext()) {
-                serializeNamespace((OMNamespace) namespaces.next(), outputer);
+                serializeNamespace((OMNamespace) namespaces.next(), omOutput);
             }
         }
     }
 
-    public static void serializeAttributes(OMElementImpl element, OMOutputer outputer) throws XMLStreamException {
+    public static void serializeAttributes(OMElementImpl element, OMOutput omOutput) throws XMLStreamException {
         if (element.getAttributes() != null) {
             Iterator attributesList = element.getAttributes();
             while (attributesList.hasNext()) {
-                serializeAttribute((OMAttribute) attributesList.next(), outputer);
+                serializeAttribute((OMAttribute) attributesList.next(), omOutput);
             }
         }
     }
@@ -172,29 +172,29 @@
      * @param cache
      * @throws XMLStreamException
      */
-    static void serializeNormal(OMElementImpl element,OMOutputer outputer, boolean cache)
+    static void serializeNormal(OMElementImpl element,OMOutput omOutput, boolean cache)
             throws XMLStreamException {
         
         if (cache){
             element.build();
         }
 
-        serializeStartpart(element,outputer);
+        serializeStartpart(element,omOutput);
         OMNode firstChild = element.firstChild;
         if (firstChild != null) {
             if (cache){
-                firstChild.serializeWithCache(outputer);
+                firstChild.serializeWithCache(omOutput);
             }else{
-                firstChild.serialize(outputer);
+                firstChild.serialize(omOutput);
             }
         }
-        serializeEndpart(outputer);
+        serializeEndpart(omOutput);
     }
 
-    static void serializeByPullStream(OMElementImpl element,OMOutputer outputer) throws XMLStreamException {
+    static void serializeByPullStream(OMElementImpl element,OMOutput omOutput) throws XMLStreamException {
         StreamingOMSerializer streamingOMSerializer =  new StreamingOMSerializer();
         streamingOMSerializer.serialize(element.getXMLStreamReaderWithoutCaching(),
-                outputer);
+                omOutput);
         return;
     }
 }

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMTextImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMTextImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMTextImpl.java Thu Jun 23 21:23:43 2005
@@ -178,9 +178,9 @@
 	 * @param writer
 	 * @throws XMLStreamException
 	 */
-	public void serializeWithCache(OMOutputer outputer)
+	public void serializeWithCache(OMOutput omOutput)
 			throws XMLStreamException {
-		XMLStreamWriter writer = outputer.getXmlStreamWriter();
+		XMLStreamWriter writer = omOutput.getXmlStreamWriter();
 		if (textType == TEXT_NODE) {
 			writer.writeCharacters(this.value);
 		} else if (textType == COMMENT_NODE) {
@@ -190,7 +190,7 @@
 		}
 		OMNode nextSibling = this.getNextSibling();
 		if (nextSibling != null) {
-			nextSibling.serializeWithCache(outputer);
+			nextSibling.serializeWithCache(omOutput);
 		}
 	}
 
@@ -284,30 +284,30 @@
 		return true;
 	}
 
-	public void serialize(OMOutputer outputer) throws XMLStreamException {
+	public void serialize(OMOutput omOutput) throws XMLStreamException {
 		boolean firstElement = false;
 
 		if (!this.isBinary) {
-			serializeWithCache(outputer);
+			serializeWithCache(omOutput);
 		} else {
-			if (outputer.doOptimise()) {
+			if (omOutput.doOptimise()) {
 				// send binary as MTOM optimised
 				this.attribute = new OMAttributeImpl("href",
 						new OMNamespaceImpl("", ""), "cid:"
 								+ this.contentID.trim());
 
-				this.serializeStartpart(outputer);
-				outputer.writeOptimised(this);
-				outputer.getXmlStreamWriter().writeEndElement();
+				this.serializeStartpart(omOutput);
+				omOutput.writeOptimised(this);
+				omOutput.getXmlStreamWriter().writeEndElement();
 			} else {
 
-				outputer.getXmlStreamWriter().writeCharacters(this.getText());
+				omOutput.getXmlStreamWriter().writeCharacters(this.getText());
 			}
 
 			OMNode nextSibling = this.getNextSibling();
 			if (nextSibling != null) {
 				// serilize next sibling
-				nextSibling.serialize(outputer);
+				nextSibling.serialize(omOutput);
 			} else {
 				// TODO : See whether following part is really needed
 				if (parent == null) {
@@ -328,12 +328,12 @@
 	/*
 	 * Methods to copy from OMSerialize utils
 	 */
-	private void serializeStartpart( OMOutputer outputer)
+	private void serializeStartpart( OMOutput omOutput)
 			throws XMLStreamException {
 		String nameSpaceName = null;
 		String writer_prefix = null;
 		String prefix = null;
-		XMLStreamWriter writer = outputer.getXmlStreamWriter();
+		XMLStreamWriter writer = omOutput.getXmlStreamWriter();
 		if (this.ns != null) {
 			nameSpaceName = this.ns.getName();
 			writer_prefix = writer.getPrefix(nameSpaceName);
@@ -366,10 +366,10 @@
 		}
 
 		// add the elements attribute "href"
-		serializeAttribute(this.attribute, outputer);
+		serializeAttribute(this.attribute, omOutput);
 
 		// add the namespace
-		serializeNamespace(this.ns, outputer);
+		serializeNamespace(this.ns, omOutput);
 
 	}
 
@@ -380,10 +380,10 @@
 	 * @param writer
 	 * @throws XMLStreamException
 	 */
-	static void serializeAttribute(OMAttribute attr, OMOutputer outputer)
+	static void serializeAttribute(OMAttribute attr, OMOutput omOutput)
 			throws XMLStreamException {
 
-		XMLStreamWriter writer = outputer.getXmlStreamWriter();
+		XMLStreamWriter writer = omOutput.getXmlStreamWriter();
 		// first check whether the attribute is associated with a namespace
 		OMNamespace ns = attr.getNamespace();
 		String prefix = null;
@@ -412,9 +412,9 @@
 	 * @param writer
 	 * @throws XMLStreamException
 	 */
-	static void serializeNamespace(OMNamespace namespace, OMOutputer outputer)
+	static void serializeNamespace(OMNamespace namespace, OMOutput omOutput)
 			throws XMLStreamException {
-		XMLStreamWriter writer = outputer.getXmlStreamWriter();
+		XMLStreamWriter writer = omOutput.getXmlStreamWriter();
 		if (namespace != null) {
 			String uri = namespace.getName();
 			String prefix = writer.getPrefix(uri);

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamWriterToContentHandlerConverter.java Thu Jun 23 21:23:43 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.axis.om.impl.llom.serialize;
 
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.xml.sax.Attributes;
@@ -45,8 +45,8 @@
      *
      * @param writer
      */
-    public StreamWriterToContentHandlerConverter(OMOutputer outputer) {
-        this.writer = outputer.getXmlStreamWriter();
+    public StreamWriterToContentHandlerConverter(OMOutput omOutput) {
+        this.writer = omOutput.getXmlStreamWriter();
     }
 
     /**

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/serialize/StreamingOMSerializer.java Thu Jun 23 21:23:43 2005
@@ -22,7 +22,7 @@
 
 import org.apache.axis.om.OMException;
 import org.apache.axis.om.OMSerializer;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 
 /**
  * Class StreamingOMSerializer
@@ -45,31 +45,31 @@
      * Method serializeWithCache
      *
      * @param obj
-     * @param outputer
+     * @param omOutput
      * @throws XMLStreamException
      */
-    public void serialize(Object obj, OMOutputer outputer)
+    public void serialize(Object obj, OMOutput omOutput)
             throws XMLStreamException {
         if (!(obj instanceof XMLStreamReader)) {
             throw new UnsupportedOperationException(
                     "Unsupported input object. Must be of the the type XMLStreamReader");
         }
         XMLStreamReader node = (XMLStreamReader) obj;
-        serializeNode(node, outputer);
+        serializeNode(node, omOutput);
     }
 
     /**
      * Method serializeNode
      *
      * @param reader
-     * @param outputer
+     * @param omOutput
      * @throws XMLStreamException
      */
-    protected void serializeNode(XMLStreamReader reader, OMOutputer outputer)
+    protected void serializeNode(XMLStreamReader reader, OMOutput omOutput)
             throws XMLStreamException {
     	//TODO We get the StAXWriter at this point and uses it hereafter assuming that this is the only entry point to this class.
     	// If there can be other classes calling methodes of this we might need to change methode signatures to OMOutputer
-    	XMLStreamWriter writer = outputer.getXmlStreamWriter();
+    	XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         while (reader.hasNext()) {
             int event = reader.next();
             if (event == START_ELEMENT) {

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=201563&r1=201562&r2=201563&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 21:23:43 2005
@@ -7,7 +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.OMOutput;
 import org.apache.axis.om.impl.llom.OMSerializerUtil;
 
 import javax.xml.namespace.QName;
@@ -74,7 +74,7 @@
         }
     }
 
-    protected void serialize(OMOutputer outputer, boolean cache) throws XMLStreamException {
+    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -83,10 +83,10 @@
         }
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(outputer));
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
         }
 
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (this.getNamespace() != null) {
            String prefix = this.getNamespace().getPrefix();
         String nameSpaceName = this.getNamespace().getName();
@@ -96,8 +96,8 @@
             writer.writeStartElement(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME);
         }
 
-        OMSerializerUtil.serializeAttributes(this, outputer);
-        OMSerializerUtil.serializeNamespaces(this, outputer);
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
 
 
         String text = this.getValue().getText();
@@ -106,7 +106,7 @@
 
         //serilize siblings
             if (this.nextSibling != null) {
-                nextSibling.serialize(outputer);
+                nextSibling.serialize(omOutput);
             } else if (this.parent != null) {
                 if (!this.parent.isComplete()) {
                     builder.setCache(cache);

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultDetailImpl.java Thu Jun 23 21:23:43 2005
@@ -5,7 +5,7 @@
 import org.apache.axis.soap.impl.llom.SOAPFaultDetailImpl;
 import org.apache.axis.soap.impl.llom.SOAPProcessingException;
 import org.apache.axis.om.impl.llom.OMElementImpl;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.OMSerializerUtil;
 import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axis.om.*;
@@ -56,7 +56,7 @@
         throw new UnsupportedOperationException();
     }
 
-    protected void serialize(OMOutputer outputer, boolean cache) throws XMLStreamException {
+    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -65,9 +65,9 @@
         }
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(outputer));
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
         }
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (this.getNamespace() != null) {
            String prefix = this.getNamespace().getPrefix();
         String nameSpaceName = this.getNamespace().getName();
@@ -76,8 +76,8 @@
         }else{
             writer.writeStartElement(SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
         }
-        OMSerializerUtil.serializeAttributes(this, outputer);
-        OMSerializerUtil.serializeNamespaces(this, outputer);
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
 
 
         String text = this.getText();
@@ -85,13 +85,13 @@
 
 
         if (firstChild != null) {
-            firstChild.serialize(outputer);
+            firstChild.serialize(omOutput);
         }
         writer.writeEndElement();
 
         //serilize siblings
         if (this.nextSibling != null) {
-            nextSibling.serialize(outputer);
+            nextSibling.serialize(omOutput);
         }
 
     }

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultImpl.java Thu Jun 23 21:23:43 2005
@@ -2,7 +2,7 @@
 
 import org.apache.axis.om.*;
 import org.apache.axis.om.impl.llom.OMElementImpl;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.OMTextImpl;
 import org.apache.axis.soap.impl.llom.*;
 import org.apache.axis.soap.impl.llom.soap12.SOAP12Constants;
@@ -62,12 +62,12 @@
         return new SOAP11FaultDetailImpl(fault);
     }
 
-    public void serializeWithCache(OMOutputer outputer) throws XMLStreamException {
-        super.serializeWithCache(outputer);
+    public void serializeWithCache(OMOutput omOutput) throws XMLStreamException {
+        super.serializeWithCache(omOutput);
     }
 
-    public void serialize(OMOutputer outputer) throws XMLStreamException {
-        super.serialize(outputer);
+    public void serialize(OMOutput omOutput) throws XMLStreamException {
+        super.serialize(omOutput);
     }
 
 //    /**

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java Thu Jun 23 21:23:43 2005
@@ -3,7 +3,7 @@
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.OMSerializerUtil;
 import org.apache.axis.soap.impl.llom.SOAPFaultReasonImpl;
 import org.apache.axis.soap.impl.llom.SOAPProcessingException;
@@ -58,7 +58,7 @@
         }
     }
 
-    protected void serialize(OMOutputer outputer, boolean cache) throws XMLStreamException {
+    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -67,10 +67,10 @@
         }
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(outputer));
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
         }
 
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (this.getNamespace() != null) {
            String prefix = this.getNamespace().getPrefix();
         String nameSpaceName = this.getNamespace().getName();
@@ -79,8 +79,8 @@
         }else{
             writer.writeStartElement(SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME);
         }
-        OMSerializerUtil.serializeAttributes(this, outputer);
-        OMSerializerUtil.serializeNamespaces(this, outputer);
+        OMSerializerUtil.serializeAttributes(this, omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
 
         String text = this.getSOAPText().getText();
         writer.writeCharacters(text);
@@ -88,7 +88,7 @@
 
         //serilize siblings
         if (this.nextSibling != null) {
-            nextSibling.serialize(outputer);
+            nextSibling.serialize(omOutput);
         } else if (this.parent != null) {
             if (!this.parent.isComplete()) {
                 builder.setCache(cache);

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java Thu Jun 23 21:23:43 2005
@@ -8,7 +8,7 @@
 import org.apache.axis.om.OMException;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.impl.llom.serialize.StreamWriterToContentHandlerConverter;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.OMSerializerUtil;
 
 import javax.xml.namespace.QName;
@@ -48,7 +48,7 @@
         }
     }
 
-    protected void serialize(OMOutputer outputer, boolean cache) throws XMLStreamException {
+    protected void serialize(OMOutput omOutput, boolean cache) throws XMLStreamException {
 
         // select the builder
         short builderType = PULL_TYPE_BUILDER;    // default is pull type
@@ -57,10 +57,10 @@
         }
         if ((builderType == PUSH_TYPE_BUILDER)
                 && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(outputer));
+            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
         }
 
-        XMLStreamWriter writer = outputer.getXmlStreamWriter();
+        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
         if (this.getNamespace() != null) {
             String prefix = this.getNamespace().getPrefix();
             String nameSpaceName = this.getNamespace().getName();
@@ -69,8 +69,8 @@
         } else {
             writer.writeStartElement(SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME);
         }
-        OMSerializerUtil.serializeAttributes(this,outputer);
-        OMSerializerUtil.serializeNamespaces(this, outputer);
+        OMSerializerUtil.serializeAttributes(this,omOutput);
+        OMSerializerUtil.serializeNamespaces(this, omOutput);
 
         String text = this.getText();
         writer.writeCharacters(text);
@@ -78,7 +78,7 @@
 
         //serilize siblings
         if (this.nextSibling != null) {
-            nextSibling.serialize(outputer);
+            nextSibling.serialize(omOutput);
         } 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=201563&r1=201562&r2=201563&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 21:23:43 2005
@@ -16,7 +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.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.SOAPFactory;
 import org.apache.axis.soap.impl.llom.builder.StAXSOAPModelBuilder;
@@ -33,7 +33,7 @@
     private SOAPEnvelope envelope = null;
     private OMXMLParserWrapper builder;
     private File tempFile;
-    private OMOutputer outputer;
+    private OMOutput omOutput;
 
     public OMNavigatorTest(String testName) {
         super(testName);
@@ -46,7 +46,7 @@
         builder = new StAXSOAPModelBuilder(xmlStreamReader);
         envelope = (SOAPEnvelope) builder.getDocumentElement();
         tempFile = File.createTempFile("temp", "xml");
-        outputer = new OMOutputer(XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile)));
+        omOutput = new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(tempFile)));
         //        writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
 
 
@@ -55,7 +55,7 @@
     public void testnavigatorFullyBuilt() throws Exception {
         assertNotNull(envelope);
         //dump the out put to a  temporary file
-        envelope.serializeWithCache(outputer);
+        envelope.serializeWithCache(omOutput);
 
         //now the OM is fully created test the navigation
         OMNavigator navigator = new OMNavigator(envelope);
@@ -98,7 +98,7 @@
     }
 
     protected void tearDown() throws Exception {
-        outputer.flush();
+        omOutput.flush();
         tempFile.delete();
     }
 

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/SOAPFaultTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/SOAPFaultTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/SOAPFaultTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/SOAPFaultTest.java Thu Jun 23 21:23:43 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.axis.om;
 
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.soap.SOAPEnvelope;
 
 import javax.xml.stream.XMLOutputFactory;
@@ -24,7 +24,7 @@
 
 public class SOAPFaultTest extends AbstractTestCase {
     private SOAPEnvelope soapEnvelope;
-    private OMOutputer outputer;
+    private OMOutput omOutput;
 
     /**
      * Constructor.
@@ -35,7 +35,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        outputer = new OMOutputer(XMLOutputFactory.newInstance().
+        omOutput = new OMOutput(XMLOutputFactory.newInstance().
                 createXMLStreamWriter(System.out));
     }
 
@@ -53,7 +53,7 @@
     }
 
     private void print() throws XMLStreamException {
-        soapEnvelope.serializeWithCache(outputer);
-        outputer.flush();
+        soapEnvelope.serializeWithCache(omOutput);
+        omOutput.flush();
     }
 }

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/ElementSerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/ElementSerializerTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/ElementSerializerTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/ElementSerializerTest.java Thu Jun 23 21:23:43 2005
@@ -31,14 +31,14 @@
 import org.apache.axis.om.OMNode;
 import org.apache.axis.om.OMText;
 import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axis.soap.SOAPBody;
 import org.apache.axis.soap.SOAPEnvelope;
 
 public class ElementSerializerTest extends AbstractTestCase {
     private XMLStreamReader reader;
-    private OMOutputer outputer;
+    private OMOutput omOutput;
     private OMXMLParserWrapper builder;
     private File tempFile;
 
@@ -50,45 +50,45 @@
         reader = XMLInputFactory.newInstance().
                 createXMLStreamReader(new FileReader(getTestResourceFile("soap/soapmessage.xml")));
         tempFile = File.createTempFile("temp", "xml");
-        outputer = new OMOutputer(XMLOutputFactory.newInstance().
+        omOutput = new OMOutput(XMLOutputFactory.newInstance().
                 createXMLStreamWriter(new FileOutputStream(tempFile)));
         builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMAbstractFactory.getSOAP11Factory(), reader);
     }
 
     public void testElementSerilization() throws Exception {
         OMElement elt = builder.getDocumentElement();
-        elt.serializeWithCache(outputer);
+        elt.serializeWithCache(omOutput);
 
     }
 
     public void testElementSerilizationCacheOff() throws Exception {
         OMElement elt = builder.getDocumentElement();
-        elt.serializeWithCache(outputer);
+        elt.serializeWithCache(omOutput);
 
     }
 
     public void testElementSerilizationChild() throws Exception {
         OMElement elt = builder.getDocumentElement();
         OMNode node = elt.getFirstChild().getNextSibling();
-        node.serializeWithCache(outputer);
+        node.serializeWithCache(omOutput);
 
     }
 
     public void testElementSerilizationSOAPBodyCacheOff() throws Exception {
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
         OMNode node = env.getBody();
-        node.serializeWithCache(outputer);
+        node.serializeWithCache(omOutput);
     }
 
     public void testElement() throws Exception {
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
         SOAPBody body = env.getBody();
-        body.serializeWithCache(outputer);
+        body.serializeWithCache(omOutput);
     }
 
     public void testCompleteElement() throws Exception {
         SOAPEnvelope env = (SOAPEnvelope) builder.getDocumentElement();
-        env.serializeWithCache(outputer);
+        env.serializeWithCache(omOutput);
     }
 
     public void testDualNamespaces1() throws Exception {
@@ -104,7 +104,7 @@
         elt12.addChild(elt22);
         root.addChild(elt11);
         root.addChild(elt12);
-        root.serializeWithCache(outputer);
+        root.serializeWithCache(omOutput);
     }
 
     public void testDualNamespaces2() throws Exception {
@@ -118,11 +118,11 @@
         elt2.addChild(txt1);
         elt1.addChild(elt2);
         root.addChild(elt1);
-        root.serializeWithCache(outputer);
+        root.serializeWithCache(omOutput);
     }
 
     protected void tearDown() throws Exception {
-        outputer.flush();
+        omOutput.flush();
         tempFile.delete();
     }
 }

Modified: webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java?rev=201563&r1=201562&r2=201563&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java (original)
+++ webservices/axis/trunk/java/modules/xml/test/org/apache/axis/om/impl/serializer/NoNamespaceSerializerTest.java Thu Jun 23 21:23:43 2005
@@ -12,7 +12,7 @@
 import org.apache.axis.om.OMAbstractFactory;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMXMLParserWrapper;
-import org.apache.axis.om.impl.llom.OMOutputer;
+import org.apache.axis.om.impl.llom.OMOutput;
 import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axis.soap.SOAPEnvelope;
 import org.apache.axis.soap.SOAPFactory;
@@ -61,7 +61,7 @@
 
     private XMLStreamReader readerOne;
     private XMLStreamReader readerTwo;
-    private OMOutputer outputer;
+    private OMOutput omOutput;
 
    // private OMXMLParserWrapper builder;
     // private File tempFile;
@@ -77,7 +77,7 @@
                 createXMLStreamReader(new InputStreamReader(new ByteArrayInputStream(xmlTextOne.getBytes())));
         readerTwo = XMLInputFactory.newInstance().
                 createXMLStreamReader(new InputStreamReader(new ByteArrayInputStream(xmlTextTwo.getBytes())));
-        outputer = new OMOutputer(XMLOutputFactory.newInstance().
+        omOutput = new OMOutput(XMLOutputFactory.newInstance().
                 createXMLStreamWriter(System.out));
         builderOne = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMAbstractFactory.getSOAP11Factory(), readerOne);
         builderTwo = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMAbstractFactory.getSOAP11Factory(), readerTwo);
@@ -101,7 +101,7 @@
 
     public void testSerilizationWithDefaultNamespaces() throws Exception {
         SOAPEnvelope env = (SOAPEnvelope) builderTwo.getDocumentElement();
-        env.serializeWithCache(outputer);
+        env.serializeWithCache(omOutput);
         OMElement balanceElement = env.getBody().getFirstElement();
         assertEquals("Deafualt namespace has not been set properly", balanceElement.getNamespace().getName(), "http://localhost:8081/axis/services/BankPort/");
 
@@ -118,7 +118,7 @@
                 createXMLStreamReader(new InputStreamReader(new ByteArrayInputStream(xmlText2.getBytes()))));
         env.getBody().addChild(builder.getDocumentElement());
 
-        OMOutputer omOutputer =  new OMOutputer(System.out,false);
+        OMOutput omOutputer =  new OMOutput(System.out,false);
         //env.getBody().addChild(builder.getDocumentElement());
         
         env.serializeWithCache(omOutputer);
@@ -129,13 +129,13 @@
     }
     public void testSerilizationWithCacheOn() throws Exception{
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
-       env.serializeWithCache(outputer);
-       outputer.flush();
+       env.serializeWithCache(omOutput);
+       omOutput.flush();
     }
 
      public void testSerilizationWithCacheOff() throws Exception{
        SOAPEnvelope env = (SOAPEnvelope) builderOne.getDocumentElement();
-       env.serializeWithCache(outputer);
-       outputer.flush();
+       env.serializeWithCache(omOutput);
+       omOutput.flush();
     }
     }



Mime
View raw message