axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r149247 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: conf/ java/org/apache/axis/encoding/ java/org/apache/axis/impl/llom/ java/org/apache/axis/impl/llom/builder/ java/org/apache/axis/impl/llom/util/ java/org/apache/axis/impl/transport/http/ java/org/apache/axis/om/ java/org/apache/axis/transport/ test-resources/ test/org/apache/axis/om/builder/dummy/
Date Mon, 31 Jan 2005 12:27:15 GMT
Author: hemapani
Date: Mon Jan 31 04:27:11 2005
New Revision: 149247

URL: http://svn.apache.org/viewcvs?view=rev&rev=149247
Log:
remove the flush from each element

Modified:
    webservices/axis/trunk/java/dev/scratch/prototype2/src/conf/log4j.properties
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectArrayImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/AxisServlet.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OutObject.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/transport/AbstractTransportSender.java
    webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/commons-logging.properties
    webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/conf/log4j.properties
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/conf/log4j.properties?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/conf/log4j.properties (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/conf/log4j.properties Mon Jan 31
04:27:11 2005
@@ -1,21 +1,14 @@
-# Set root category priority to INFO and its only appender to CONSOLE.
-#log4j.rootCategory=INFO, CONSOLE
-log4j.rootCategory=FATAL, CONSOLE, LOGFILE
-
-# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
-log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE,LOGFILE
-
-# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=FATAL
-#log4j.appender.CONSOLE.Threshold=INFO
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
-
-# LOGFILE is set to be a File appender using a PatternLayout.
-log4j.appender.LOGFILE=org.apache.log4j.FileAppender
-log4j.appender.LOGFILE.File=axis.log
-log4j.appender.LOGFILE.Append=true
-log4j.appender.LOGFILE.Threshold=FATAL
-log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+#### Use two appenders, one to log to console, another to log to a file
+log4j.rootCategory=FATAL, R
+
+####  appender writes to a file
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=axis.log
+
+# Control the maximum log file size
+log4j.appender.R.MaxFileSize=10000KB
+# Archive log files (one backup file here)
+log4j.appender.R.MaxBackupIndex=100
+
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%6r %5p [%t] (%F:%L) - %m%n

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectArrayImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectArrayImpl.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectArrayImpl.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectArrayImpl.java
Mon Jan 31 04:27:11 2005
@@ -23,7 +23,6 @@
 
 
 public class OutObjectArrayImpl implements OutObject{
-    private ContentHandler cHandler;
     private Object[] obj = null;
     private Encoder arrayTypeEncoder;
     
@@ -31,21 +30,14 @@
        this.obj = obj;
        this.arrayTypeEncoder = arrayTypeEncoder;
     }
-    public ContentHandler getContentHandler() {
-        return cHandler;
-    }
-
-    public void setContentHandler(ContentHandler contentHandler) {
-        this.cHandler = contentHandler;
-		arrayTypeEncoder.setContentHandler(contentHandler);
-    }
-
-    public void startBuilding() throws OMException {
+ 
+ 
+    public void startBuilding(ContentHandler cHandler) throws OMException {
         try {
         	for(int i = 0;i<obj.length;i++){
 				cHandler.startElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME,"",null);
 				arrayTypeEncoder.setObject(obj[i]);
-				arrayTypeEncoder.startBuilding();
+				arrayTypeEncoder.startBuilding(cHandler);
 				cHandler.endElement(OMConstants.ARRAY_ITEM_NSURI,OMConstants.ARRAY_ITEM_LOCALNAME,"");
         	}
         } catch (SAXException e) {

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectImpl.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectImpl.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/encoding/OutObjectImpl.java
Mon Jan 31 04:27:11 2005
@@ -23,20 +23,20 @@
 
 
 public class OutObjectImpl implements OutObject{
-    private ContentHandler cHandler;
+//    private ContentHandler cHandler;
     private Object obj = null;
     public OutObjectImpl(Object obj){
        this.obj = obj;
     }
-    public ContentHandler getContentHandler() {
-        return cHandler;
-    }
-
-    public void setContentHandler(ContentHandler contentHandler) {
-        this.cHandler = contentHandler;
-    }
+//    public ContentHandler getContentHandler() {
+//        return cHandler;
+//    }
+//
+//    public void setContentHandler() {
+//        this.cHandler = contentHandler;
+//    }
 
-    public void startBuilding() throws OMException {
+    public void startBuilding(ContentHandler cHandler) throws OMException {
         try {
             if(obj instanceof String){
                 char[] str = ((String)obj).toCharArray();

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/OMElementImpl.java
Mon Jan 31 04:27:11 2005
@@ -528,7 +528,6 @@
         }
 
         writer.writeEndElement();
-        writer.flush();
     }
 
     private void serializeNormal(XMLStreamWriter writer, boolean cache) throws XMLStreamException
{

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
Mon Jan 31 04:27:11 2005
@@ -1,13 +1,21 @@
 package org.apache.axis.impl.llom.builder;
 
-import org.apache.axis.om.*;
+import java.util.Vector;
+
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMException;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.OutObject;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 
-import java.util.Vector;
-
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -62,7 +70,6 @@
         this.startElement = startElement;
         lastNode = startElement;
         startElement.setBuilder(this);
-        this.outObject.setContentHandler(this);
         omFactory = OMFactory.newInstance();
     }
 
@@ -78,9 +85,11 @@
                     if (externalContentHandler == null) {
                         throw new IllegalStateException("Cannot have no cache with an empty
content handler");
                     }
-                    outObject.setContentHandler(externalContentHandler);
+					outObject.startBuilding(externalContentHandler);
+                }else{
+					outObject.startBuilding(this);
                 }
-                outObject.startBuilding();
+                
                 this.startElement.setComplete(true);
             }
         }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
Mon Jan 31 04:27:11 2005
@@ -74,7 +74,6 @@
     public void endElement(String namespaceURI, String localName, String qName) throws SAXException
{
         try {
             writer.writeEndElement();
-            writer.flush();
         } catch (XMLStreamException e) {
             throw new SAXException(e);
         }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/AxisServlet.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/AxisServlet.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/transport/http/AxisServlet.java
Mon Jan 31 04:27:11 2005
@@ -15,14 +15,10 @@
  */
 package org.apache.axis.impl.transport.http;
 
-import org.apache.axis.addressing.AddressingConstants;
-import org.apache.axis.addressing.EndpointReference;
-import org.apache.axis.context.MessageContext;
-import org.apache.axis.engine.*;
-import org.apache.axis.impl.llom.builder.StAXBuilder;
-import org.apache.axis.impl.llom.builder.StAXSOAPModelBuilder;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.SOAPEnvelope;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
@@ -34,9 +30,19 @@
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.engine.AxisEngine;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.engine.EngineRegistry;
+import org.apache.axis.engine.EngineRegistryFactory;
+import org.apache.axis.engine.TransportSenderLocator;
+import org.apache.axis.impl.llom.builder.StAXBuilder;
+import org.apache.axis.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.SOAPEnvelope;
 
 
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OutObject.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OutObject.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OutObject.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OutObject.java
Mon Jan 31 04:27:11 2005
@@ -26,22 +26,22 @@
  * So this interface has to be implemented by the Object which AXIOM recieves for OUT path.
  */
 public interface OutObject {
-    /**
-     * This method will help to register a ContentHandler with the Object
-     *
-     * @param contentHandler
-     */
-    public void setContentHandler(ContentHandler contentHandler);
-
-    /**
-     * @return
-     */
-
-    public ContentHandler getContentHandler();
+//    /**
+//     * This method will help to register a ContentHandler with the Object
+//     *
+//     * @param contentHandler
+//     */
+//    public void setContentHandler(ContentHandler contentHandler);
+//
+//    /**
+//     * @return
+//     */
+//
+////    public ContentHandler getContentHandler();
 
     /**
      * When this method is being called the Object should start throwing SAX events through
the
      * ContentHandler registered earlier.
      */
-    public void startBuilding()throws OMException ;
+    public void startBuilding(ContentHandler contentHandler)throws OMException ;
 }

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/transport/AbstractTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/transport/AbstractTransportSender.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/transport/AbstractTransportSender.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/transport/AbstractTransportSender.java
Mon Jan 31 04:27:11 2005
@@ -53,14 +53,21 @@
         startSending();
         SOAPEnvelope envelope = msgContext.getEnvelope();
         if (envelope != null) {
+			XMLStreamWriter outputWriter = null;
             try {
-                XMLStreamWriter outputWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
+                outputWriter = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
                 envelope.serialize(outputWriter,true);
             } catch (XMLStreamException e) {
                 throw new AxisFault("Stream error",e);
+            }finally{
+            	try {
+					outputWriter.flush();
+				} catch (XMLStreamException e1) {
+					throw new AxisFault("Error flushing the stream",e1);
+				}
             }
-
         }
+		
         finalizeSending();
     }
 

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/commons-logging.properties
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/commons-logging.properties?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/commons-logging.properties
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test-resources/commons-logging.properties
Mon Jan 31 04:27:11 2005
@@ -1,8 +1,8 @@
 # Uncomment the next line to disable all logging.
-#org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
 
 # Uncomment the next line to enable the simple log based logging
 #org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
 
 # Uncomment the next line to enable log4j based logging
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java?view=diff&r1=149246&r2=149247
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
(original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
Mon Jan 31 04:27:11 2005
@@ -1,15 +1,16 @@
 package org.apache.axis.om.builder.dummy;
 
+import java.io.FileReader;
+import java.io.IOException;
+
+import javax.xml.parsers.SAXParserFactory;
+
 import org.apache.axis.om.OutObject;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 
-import javax.xml.parsers.SAXParserFactory;
-import java.io.FileReader;
-import java.io.IOException;
-
 /**
  * Copyright 2001-2004 The Apache Software Foundation.
  * <p/>
@@ -50,16 +51,8 @@
 
     }
 
-    public void setContentHandler(ContentHandler contentHandler) {
-        parser.setContentHandler(contentHandler);
-
-    }
-
-    public ContentHandler getContentHandler() {
-        return parser.getContentHandler();
-    }
 
-    public void startBuilding() {
+    public void startBuilding(ContentHandler contentHandler) {
         try {
             parser.parse(new InputSource(new FileReader(fileName)));
         } catch (IOException e) {



Mime
View raw message