ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1728960 [1/2] - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/ aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/ aspects/om-aspects/src/main/java/org/apache/axiom/om/i...
Date Sun, 07 Feb 2016 13:34:13 GMT
Author: veithen
Date: Sun Feb  7 13:34:12 2016
New Revision: 1728960

URL: http://svn.apache.org/viewvc?rev=1728960&view=rev
Log:
Some trivial refactorings to make the Handler and Serializer APIs converge.

Added:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/StreamException.java
      - copied, changed from r1728954, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/OutputException.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/XmlHandler.java
      - copied, changed from r1728946, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Handler.java
Removed:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/Handler.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/OutputException.java
Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomExceptionTranslator.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/OMContentHandler.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/SAXResultContentHandler.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandler.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandlerXMLStreamWriter.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/Serializer.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/SAXSerializer.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/XMLReaderImpl.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/stax/StAXSerializer.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/intf/AxiomSerializable.java
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomCommentSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocTypeSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocumentSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomEntityReferenceSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomProcessingInstructionSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSerializableSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomTextSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAPMessageSupport.aj
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomExceptionTranslator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomExceptionTranslator.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomExceptionTranslator.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/AxiomExceptionTranslator.java Sun Feb  7 13:34:12 2016
@@ -22,7 +22,7 @@ import javax.xml.stream.XMLStreamExcepti
 
 import org.apache.axiom.core.CoreModelException;
 import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public class AxiomExceptionTranslator {
     private AxiomExceptionTranslator() {}
@@ -31,7 +31,7 @@ public class AxiomExceptionTranslator {
         return new OMException(ex);
     }
     
-    public static XMLStreamException toXMLStreamException(OutputException ex) {
+    public static XMLStreamException toXMLStreamException(StreamException ex) {
         Throwable cause = ex.getCause();
         if (cause instanceof XMLStreamException) {
             return (XMLStreamException)cause;

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/OMContentHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/OMContentHandler.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/OMContentHandler.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/OMContentHandler.java Sun Feb  7 13:34:12 2016
@@ -20,6 +20,8 @@ package org.apache.axiom.om.impl.common;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.impl.stream.StreamException;
+import org.apache.axiom.om.impl.stream.XmlHandler;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.DTDHandler;
@@ -34,7 +36,7 @@ import java.util.Map;
 import javax.xml.stream.XMLStreamConstants;
 
 public final class OMContentHandler implements ContentHandler, LexicalHandler, DeclHandler, DTDHandler {
-    private final Handler handler;
+    private final XmlHandler handler;
     private final boolean expandEntityReferences;
     
     /**
@@ -85,20 +87,37 @@ public final class OMContentHandler impl
     private boolean inEntityReference;
     private int entityReferenceDepth;
 
-    public OMContentHandler(Handler handler, boolean expandEntityReferences) {
+    public OMContentHandler(XmlHandler handler, boolean expandEntityReferences) {
         this.handler = handler;
         this.expandEntityReferences = expandEntityReferences;
     }
     
+    private static SAXException toSAXException(StreamException ex) {
+        Throwable cause = ex.getCause();
+        if (cause instanceof SAXException) {
+            return (SAXException)cause;
+        } else {
+            return new SAXException(ex);
+        }
+    }
+    
     public final void setDocumentLocator(Locator locator) {
     }
 
     public final void startDocument() throws SAXException {
-        handler.startDocument(null, "1.0", null, true);
+        try {
+            handler.startDocument(null, "1.0", null, true);
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
+        }
     }
 
     public final void endDocument() throws SAXException {
-        handler.endDocument();
+        try {
+            handler.endDocument();
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
+        }
     }
 
     public final void startDTD(String name, String publicId, String systemId) throws SAXException {
@@ -198,8 +217,12 @@ public final class OMContentHandler impl
     }
 
     public final void endDTD() throws SAXException {
-        handler.createDocumentTypeDeclaration(dtdName, dtdPublicId, dtdSystemId,
-                internalSubset.length() == 0 ? null : internalSubset.toString());
+        try {
+            handler.processDocumentTypeDeclaration(dtdName, dtdPublicId, dtdSystemId,
+                    internalSubset.length() == 0 ? null : internalSubset.toString());
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
+        }
         internalSubset = null;
     }
 
@@ -235,14 +258,17 @@ public final class OMContentHandler impl
      */
     public final void startElement(String namespaceURI, String localName,
                              String qName, Attributes atts) throws SAXException {
-        if (!inEntityReference) {
+        if (inEntityReference) {
+            return;
+        }
+        try {
             if (localName == null || localName.trim().equals(""))
                 localName = qName.substring(qName.indexOf(':') + 1);
             int idx = qName.indexOf(':');
             String prefix = idx == -1 ? "" : qName.substring(0, idx);
             handler.startElement(namespaceURI, localName, prefix);
             for (int i = 0; i < namespaceCount; i++) {
-                handler.createNamespaceDeclaration(namespaces[2*i], namespaces[2*i+1]);
+                handler.processNamespaceDeclaration(namespaces[2*i], namespaces[2*i+1]);
             }
             namespaceCount = 0;
     
@@ -258,10 +284,12 @@ public final class OMContentHandler impl
                 if (!attrQName.startsWith("xmlns")) {
                     idx = attrQName.indexOf(':');
                     String attrPrefix = idx == -1 ? "" : attrQName.substring(0, idx);
-                    handler.createAttribute(atts.getURI(i), atts.getLocalName(i), attrPrefix, atts.getValue(i), atts.getType(i), true);
+                    handler.processAttribute(atts.getURI(i), atts.getLocalName(i), attrPrefix, atts.getValue(i), atts.getType(i), true);
                 }
             }
             handler.attributesCompleted();
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
         }
     }
 
@@ -274,7 +302,11 @@ public final class OMContentHandler impl
     public final void endElement(String uri, String localName, String qName)
             throws SAXException {
         if (!inEntityReference) {
-            handler.endElement();
+            try {
+                handler.endElement();
+            } catch (StreamException ex) {
+                throw toSAXException(ex);
+            }
         }
     }
 
@@ -292,7 +324,10 @@ public final class OMContentHandler impl
 
     private void characterData(char[] ch, int start, int length, int nodeType)
             throws SAXException {
-        if (!inEntityReference) {
+        if (inEntityReference) {
+            return;
+        }
+        try {
             String text = new String(ch, start, length);
             switch (nodeType) {
                 case XMLStreamConstants.CHARACTERS:
@@ -302,11 +337,13 @@ public final class OMContentHandler impl
                     handler.processCharacterData(text, true);
                     break;
                 case XMLStreamConstants.CDATA:
-                    handler.createCDATASection(text);
+                    handler.processCDATASection(text);
                     break;
                 default:
                     throw new IllegalArgumentException();
             }
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
         }
     }
 
@@ -327,18 +364,30 @@ public final class OMContentHandler impl
     public final void processingInstruction(String piTarget, String data)
             throws SAXException {
         if (!inEntityReference) {
-            handler.createProcessingInstruction(piTarget, data);
+            try {
+                handler.processProcessingInstruction(piTarget, data);
+            } catch (StreamException ex) {
+                throw toSAXException(ex);
+            }
         }
     }
 
     public final void comment(char[] ch, int start, int length) throws SAXException {
         if (!inEntityReference) {
-            handler.createComment(new String(ch, start, length));
+            try {
+                handler.processComment(new String(ch, start, length));
+            } catch (StreamException ex) {
+                throw toSAXException(ex);
+            }
         }
     }
 
     public final void skippedEntity(String name) throws SAXException {
-        handler.createEntityReference(name, null);
+        try {
+            handler.processEntityReference(name, null);
+        } catch (StreamException ex) {
+            throw toSAXException(ex);
+        }
     }
 
     public final void startEntity(String name) throws SAXException {
@@ -347,7 +396,11 @@ public final class OMContentHandler impl
         } else if (name.equals("[dtd]")) {
             inExternalSubset = true;
         } else if (!expandEntityReferences) {
-            handler.createEntityReference(name, entities == null ? null : entities.get(name));
+            try {
+                handler.processEntityReference(name, entities == null ? null : entities.get(name));
+            } catch (StreamException ex) {
+                throw toSAXException(ex);
+            }
             inEntityReference = true;
             entityReferenceDepth = 1;
         }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/SAXResultContentHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/SAXResultContentHandler.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/SAXResultContentHandler.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/SAXResultContentHandler.java Sun Feb  7 13:34:12 2016
@@ -26,8 +26,9 @@ import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.impl.stream.XmlHandler;
 
-public final  class SAXResultContentHandler implements Handler {
+public final  class SAXResultContentHandler implements XmlHandler {
     private final OMContainer root;
     private final OMFactory factory;
     private OMContainer target;
@@ -44,7 +45,7 @@ public final  class SAXResultContentHand
     public void endDocument() {
     }
 
-    public void createDocumentTypeDeclaration(String rootName, String publicId,
+    public void processDocumentTypeDeclaration(String rootName, String publicId,
             String systemId, String internalSubset) {
         if (target instanceof OMDocument) {
             factory.createOMDocType(target, rootName, publicId, systemId, internalSubset);
@@ -61,7 +62,7 @@ public final  class SAXResultContentHand
     }
 
     @Override
-    public void createAttribute(String namespaceURI, String localName, String prefix, String value,
+    public void processAttribute(String namespaceURI, String localName, String prefix, String value,
             String type, boolean specified) {
         OMElement element = (OMElement)target;
         OMNamespace ns;
@@ -78,7 +79,7 @@ public final  class SAXResultContentHand
     }
 
     @Override
-    public void createNamespaceDeclaration(String prefix, String namespaceURI) {
+    public void processNamespaceDeclaration(String prefix, String namespaceURI) {
         if (prefix.isEmpty()) {
             ((OMElement)target).declareDefaultNamespace(namespaceURI);
         } else {
@@ -96,19 +97,19 @@ public final  class SAXResultContentHand
     }
 
     @Override
-    public void createCDATASection(String content) {
+    public void processCDATASection(String content) {
         factory.createOMText(target, content, OMNode.CDATA_SECTION_NODE);
     }
 
-    public void createProcessingInstruction(String piTarget, String piData) {
+    public void processProcessingInstruction(String piTarget, String piData) {
         factory.createOMProcessingInstruction(target, piTarget, piData);
     }
 
-    public void createComment(String content) {
+    public void processComment(String content) {
         factory.createOMComment(target, content);
     }
 
-    public void createEntityReference(String name, String replacementText) {
+    public void processEntityReference(String name, String replacementText) {
         if (replacementText == null) {
             factory.createOMEntityReference(target, name);
         } else {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandler.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandler.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandler.java Sun Feb  7 13:34:12 2016
@@ -32,7 +32,6 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMSerializable;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.common.AxiomSemantics;
-import org.apache.axiom.om.impl.common.Handler;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.intf.AxiomAttribute;
 import org.apache.axiom.om.impl.intf.AxiomCDATASection;
@@ -47,11 +46,12 @@ import org.apache.axiom.om.impl.intf.Axi
 import org.apache.axiom.om.impl.intf.AxiomNamespaceDeclaration;
 import org.apache.axiom.om.impl.intf.AxiomProcessingInstruction;
 import org.apache.axiom.om.impl.intf.AxiomSourcedElement;
+import org.apache.axiom.om.impl.stream.XmlHandler;
 import org.apache.axiom.util.namespace.ScopedNamespaceContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-public final class BuilderHandler implements Handler {
+public final class BuilderHandler implements XmlHandler {
     private static final Log log = LogFactory.getLog(BuilderHandler.class);
     
     private static final OMNamespace DEFAULT_NS = new OMNamespaceImpl("", "");
@@ -138,7 +138,7 @@ public final class BuilderHandler implem
         }
     }
     
-    public void createDocumentTypeDeclaration(String rootName, String publicId, String systemId,
+    public void processDocumentTypeDeclaration(String rootName, String publicId, String systemId,
             String internalSubset) {
         model.validateEventType(XMLStreamConstants.DTD);
         AxiomDocType node = nodeFactory.createNode(AxiomDocType.class);
@@ -200,7 +200,7 @@ public final class BuilderHandler implem
         }
     }
 
-    public void createAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) {
+    public void processAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) {
         OMNamespace ns = nsCache.getOMNamespace(namespaceURI, prefix);
         AxiomAttribute attr = nodeFactory.createNode(AxiomAttribute.class);
         attr.internalSetLocalName(localName);
@@ -214,7 +214,7 @@ public final class BuilderHandler implem
         }
     }
     
-    public void createNamespaceDeclaration(String prefix, String namespaceURI) {
+    public void processNamespaceDeclaration(String prefix, String namespaceURI) {
         if (nsContext != null) {
             for (int i=nsContext.getFirstBindingInCurrentScope(); i<nsContext.getBindingsCount(); i++) {
                 if (nsContext.getPrefix(i).equals(prefix)) {
@@ -250,7 +250,7 @@ public final class BuilderHandler implem
         addChild(node);
     }
     
-    public void createProcessingInstruction(String piTarget, String piData) {
+    public void processProcessingInstruction(String piTarget, String piData) {
         model.validateEventType(XMLStreamConstants.PROCESSING_INSTRUCTION);
         AxiomProcessingInstruction node = nodeFactory.createNode(AxiomProcessingInstruction.class);
         node.coreSetTarget(piTarget);
@@ -258,21 +258,21 @@ public final class BuilderHandler implem
         addChild(node);
     }
 
-    public void createComment(String content) {
+    public void processComment(String content) {
         model.validateEventType(XMLStreamConstants.COMMENT);
         AxiomComment node = nodeFactory.createNode(AxiomComment.class);
         node.coreSetCharacterData(content, AxiomSemantics.INSTANCE);
         addChild(node);
     }
     
-    public void createCDATASection(String content) {
+    public void processCDATASection(String content) {
         model.validateEventType(XMLStreamConstants.CDATA);
         AxiomCDATASection node = nodeFactory.createNode(AxiomCDATASection.class);
         node.coreSetCharacterData(content, AxiomSemantics.INSTANCE);
         addChild(node);
     }
     
-    public void createEntityReference(String name, String replacementText) {
+    public void processEntityReference(String name, String replacementText) {
         model.validateEventType(XMLStreamConstants.ENTITY_REFERENCE);
         AxiomEntityReference node = nodeFactory.createNode(AxiomEntityReference.class);
         node.coreSetName(name);

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandlerXMLStreamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandlerXMLStreamWriter.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandlerXMLStreamWriter.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/BuilderHandlerXMLStreamWriter.java Sun Feb  7 13:34:12 2016
@@ -113,7 +113,7 @@ public class BuilderHandlerXMLStreamWrit
     }
 
     protected void doWriteAttribute(String prefix, String namespaceURI, String localName, String value) {
-        handler.createAttribute(normalize(namespaceURI), localName, normalize(prefix), value, OMConstants.XMLATTRTYPE_CDATA, true);
+        handler.processAttribute(normalize(namespaceURI), localName, normalize(prefix), value, OMConstants.XMLATTRTYPE_CDATA, true);
     }
 
     protected void doWriteAttribute(String localName, String value) throws XMLStreamException {
@@ -121,7 +121,7 @@ public class BuilderHandlerXMLStreamWrit
     }
 
     protected void doWriteNamespace(String prefix, String namespaceURI) {
-        handler.createNamespaceDeclaration(normalize(prefix), normalize(namespaceURI));
+        handler.processNamespaceDeclaration(normalize(prefix), normalize(namespaceURI));
     }
 
     protected void doWriteDefaultNamespace(String namespaceURI) {
@@ -139,22 +139,22 @@ public class BuilderHandlerXMLStreamWrit
 
     protected void doWriteCData(String data) {
         finishStartElement();
-        handler.createCDATASection(data);
+        handler.processCDATASection(data);
     }
 
     protected void doWriteComment(String data) {
         finishStartElement();
-        handler.createComment(data);
+        handler.processComment(data);
     }
 
     protected void doWriteEntityRef(String name) throws XMLStreamException {
         finishStartElement();
-        handler.createEntityReference(name, null);
+        handler.processEntityReference(name, null);
     }
 
     protected void doWriteProcessingInstruction(String piTarget, String data) {
         finishStartElement();
-        handler.createProcessingInstruction(piTarget, data);
+        handler.processProcessingInstruction(piTarget, data);
     }
 
     protected void doWriteProcessingInstruction(String target) {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/builder/StAXOMBuilder.java Sun Feb  7 13:34:12 2016
@@ -192,7 +192,7 @@ public class StAXOMBuilder extends Abstr
                     handler.processCharacterData(text, true);
                     break;
                 case XMLStreamConstants.CDATA:
-                    handler.createCDATASection(text);
+                    handler.processCDATASection(text);
                     break;
                 default:
                     throw new IllegalStateException();
@@ -529,16 +529,16 @@ public class StAXOMBuilder extends Abstr
                     handler.endDocument();
                     break;
                 case XMLStreamConstants.COMMENT:
-                    handler.createComment(parser.getText());
+                    handler.processComment(parser.getText());
                     break;
                 case XMLStreamConstants.DTD:
                     createDTD();
                     break;
                 case XMLStreamConstants.PROCESSING_INSTRUCTION:
-                    handler.createProcessingInstruction(parser.getPITarget(), parser.getPIData());
+                    handler.processProcessingInstruction(parser.getPITarget(), parser.getPIData());
                     break;
                 case XMLStreamConstants.ENTITY_REFERENCE:
-                    handler.createEntityReference(parser.getLocalName(), parser.getText());
+                    handler.processEntityReference(parser.getLocalName(), parser.getText());
                     break;
                 default :
                     throw new OMException();
@@ -589,12 +589,12 @@ public class StAXOMBuilder extends Abstr
         if (newElement == null) {
             handler.startElement(namespaceURI, localName, prefix);
             for (int i = 0, count = parser.getNamespaceCount(); i < count; i++) {
-                handler.createNamespaceDeclaration(
+                handler.processNamespaceDeclaration(
                         normalize(parser.getNamespacePrefix(i)),
                         normalize(parser.getNamespaceURI(i)));
             }
             for (int i = 0, count = parser.getAttributeCount(); i < count; i++) {
-                handler.createAttribute(
+                handler.processAttribute(
                         normalize(parser.getAttributeNamespace(i)),
                         parser.getAttributeLocalName(i),
                         normalize(parser.getAttributePrefix(i)),
@@ -661,7 +661,7 @@ public class StAXOMBuilder extends Abstr
         if (internalSubset != null && internalSubset.length() == 0) {
             internalSubset = null;
         }
-        handler.createDocumentTypeDeclaration(dtdReader.getRootName(), dtdReader.getPublicId(),
+        handler.processDocumentTypeDeclaration(dtdReader.getRootName(), dtdReader.getPublicId(),
                 dtdReader.getSystemId(), internalSubset);
     }
     

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/Serializer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/Serializer.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/Serializer.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/Serializer.java Sun Feb  7 13:34:12 2016
@@ -27,6 +27,7 @@ import javax.xml.stream.XMLStreamExcepti
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.axiom.core.CoreAttribute;
 import org.apache.axiom.ext.stax.DTDReader;
 import org.apache.axiom.ext.stax.datahandler.DataHandlerProvider;
 import org.apache.axiom.ext.stax.datahandler.DataHandlerReader;
@@ -39,6 +40,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMSerializable;
 import org.apache.axiom.om.impl.common.util.OMDataSourceUtil;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
 
 public abstract class Serializer {
@@ -79,12 +81,12 @@ public abstract class Serializer {
         this.preserveNamespaceContext = preserveNamespaceContext;
     }
 
-    public final void serializeStartpart(OMElement element) throws OutputException {
+    public final void serializeStartpart(OMElement element) throws StreamException {
         OMNamespace ns = element.getNamespace();
         if (ns == null) {
-            internalBeginStartElement("", "", element.getLocalName());
+            internalStartElement("", element.getLocalName(), "");
         } else {
-            internalBeginStartElement(ns.getPrefix(), ns.getNamespaceURI(), element.getLocalName());
+            internalStartElement(ns.getNamespaceURI(), element.getLocalName(), ns.getPrefix());
         }
         if (preserveNamespaceContext && element == root) {
             // Maintain a set of the prefixes we have already seen. This is required to take into
@@ -115,15 +117,15 @@ public abstract class Serializer {
             OMAttribute attr = it.next();
             ns = attr.getNamespace();
             if (ns == null) {
-                processAttribute("", "", attr.getLocalName(), attr.getAttributeType(), attr.getAttributeValue());
+                internalProcessAttribute("", attr.getLocalName(), "", attr.getAttributeValue(), attr.getAttributeType(), ((CoreAttribute)attr).coreGetSpecified());
             } else {
-                processAttribute(ns.getPrefix(), ns.getNamespaceURI(), attr.getLocalName(), attr.getAttributeType(), attr.getAttributeValue());
+                internalProcessAttribute(ns.getNamespaceURI(), attr.getLocalName(), ns.getPrefix(), attr.getAttributeValue(), attr.getAttributeType(), ((CoreAttribute)attr).coreGetSpecified());
             }
         }
-        finishStartElement();
+        attributesCompleted();
     }
     
-    public final void copyEvent(XMLStreamReader reader, DataHandlerReader dataHandlerReader) throws OutputException {
+    public final void copyEvent(XMLStreamReader reader, DataHandlerReader dataHandlerReader) throws StreamException {
         try {
             int eventType = reader.getEventType();
             switch (eventType) {
@@ -137,25 +139,26 @@ public abstract class Serializer {
                     if (dtdReader == null) {
                         throw new XMLStreamException("Cannot serialize the DTD because the XMLStreamReader doesn't support the DTDReader extension");
                     }
-                    writeDTD(dtdReader.getRootName(), dtdReader.getPublicId(), dtdReader.getSystemId(), reader.getText());
+                    processDocumentTypeDeclaration(dtdReader.getRootName(), dtdReader.getPublicId(), dtdReader.getSystemId(), reader.getText());
                     break;
                 case XMLStreamReader.START_ELEMENT:
-                    internalBeginStartElement(normalize(reader.getPrefix()), normalize(reader.getNamespaceURI()), reader.getLocalName());
+                    internalStartElement(normalize(reader.getNamespaceURI()), reader.getLocalName(), normalize(reader.getPrefix()));
                     for (int i=0, count=reader.getNamespaceCount(); i<count; i++) {
                         mapNamespace(normalize(reader.getNamespacePrefix(i)), normalize(reader.getNamespaceURI(i)), true, false);
                     }
                     for (int i=0, count=reader.getAttributeCount(); i<count; i++) {
-                        processAttribute(
-                                normalize(reader.getAttributePrefix(i)),
+                        internalProcessAttribute(
                                 normalize(reader.getAttributeNamespace(i)),
                                 reader.getAttributeLocalName(i),
+                                normalize(reader.getAttributePrefix(i)),
+                                reader.getAttributeValue(i),
                                 reader.getAttributeType(i),
-                                reader.getAttributeValue(i));
+                                reader.isAttributeSpecified(i));
                     }
-                    finishStartElement();
+                    attributesCompleted();
                     break;
                 case XMLStreamReader.END_ELEMENT:
-                    writeEndElement();
+                    endElement();
                     break;
                 case XMLStreamReader.CHARACTERS:
                     if (dataHandlerReader != null && dataHandlerReader.isBinary()) {
@@ -174,13 +177,13 @@ public abstract class Serializer {
                     writeText(eventType, reader.getText());
                     break;
                 case XMLStreamReader.PROCESSING_INSTRUCTION:
-                    writeProcessingInstruction(reader.getPITarget(), reader.getPIData());
+                    processProcessingInstruction(reader.getPITarget(), reader.getPIData());
                     break;
                 case XMLStreamReader.COMMENT:
-                    writeComment(reader.getText());
+                    processComment(reader.getText());
                     break;
                 case XMLStreamReader.ENTITY_REFERENCE:
-                    writeEntityRef(reader.getLocalName());
+                    processEntityReference(reader.getLocalName(), reader.getText());
                     break;
                 default:
                     throw new IllegalStateException();
@@ -194,12 +197,12 @@ public abstract class Serializer {
         return s == null ? "" : s;
     }
     
-    private void internalBeginStartElement(String prefix, String namespaceURI, String localName) throws OutputException {
-        beginStartElement(prefix, namespaceURI, localName);
+    private void internalStartElement(String namespaceURI, String localName, String prefix) throws StreamException {
+        startElement(namespaceURI, localName, prefix);
         mapNamespace(prefix, namespaceURI, false, false);
     }
     
-    private void processAttribute(String prefix, String namespaceURI, String localName, String type, String value) throws OutputException {
+    private void internalProcessAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) throws StreamException {
         mapNamespace(prefix, namespaceURI, false, true);
         if (namespaceRepairing && contextElement != null && namespaceURI.equals(XSI_URI) && localName.equals(XSI_LOCAL_NAME)) {
             String trimmedValue = value.trim();
@@ -211,7 +214,7 @@ public abstract class Serializer {
                 }
             }
         }
-        addAttribute(prefix, namespaceURI, localName, type, value);
+        processAttribute(namespaceURI, localName, prefix, value, type, specified);
     }
     
     /**
@@ -228,7 +231,7 @@ public abstract class Serializer {
      *            the name of an element or attribute
      * @param attr
      */
-    private void mapNamespace(String prefix, String namespaceURI, boolean fromDecl, boolean attr) throws OutputException {
+    private void mapNamespace(String prefix, String namespaceURI, boolean fromDecl, boolean attr) throws StreamException {
         if (namespaceRepairing) {
             // If the prefix and namespace are already associated, no generation is needed
             if (isAssociated(prefix, namespaceURI)) {
@@ -242,12 +245,12 @@ public abstract class Serializer {
             }
             
             // Add the namespace if the prefix is not associated.
-            addNamespace(prefix, namespaceURI);
+            processNamespaceDeclaration(prefix, namespaceURI);
         } else {
             // If namespace repairing is disabled, only output namespace declarations that appear
             // explicitly in the input
             if (fromDecl) {
-                addNamespace(prefix, namespaceURI);
+                processNamespaceDeclaration(prefix, namespaceURI);
             }
         }
     }
@@ -257,12 +260,12 @@ public abstract class Serializer {
      * 
      * @param dataSource
      *            the data source to serialize
-     * @throws OutputException
+     * @throws StreamException
      *             if an error occurs while writing the data
      * @throws DeferredParsingException
      *             if an error occurs while reading from the data source
      */
-    public final void serialize(OMDataSource dataSource) throws OutputException {
+    public final void serialize(OMDataSource dataSource) throws StreamException {
         // Note: if we can't determine the type (push/pull) of the OMDataSource, we
         // default to push
         if (OMDataSourceUtil.isPullDataSource(dataSource)) {
@@ -294,29 +297,29 @@ public abstract class Serializer {
         }
     }
     
-    protected abstract boolean isAssociated(String prefix, String namespace) throws OutputException;
+    protected abstract boolean isAssociated(String prefix, String namespace) throws StreamException;
     
-    public abstract void writeStartDocument(String version) throws OutputException;
+    public abstract void writeStartDocument(String version) throws StreamException;
     
-    public abstract void writeStartDocument(String encoding, String version) throws OutputException;
+    public abstract void writeStartDocument(String encoding, String version) throws StreamException;
     
-    public abstract void writeDTD(String rootName, String publicId, String systemId, String internalSubset) throws OutputException;
+    public abstract void processDocumentTypeDeclaration(String rootName, String publicId, String systemId, String internalSubset) throws StreamException;
     
     /**
      * Prepare to write an element start tag. A call to this method will be followed by zero or more
-     * calls to {@link #addNamespace(String, String)} and
-     * {@link #addAttribute(String, String, String, String, String)} and a single call to
-     * {@link #finishStartElement()}.
+     * calls to {@link #processNamespaceDeclaration(String, String)} and
+     * {@link #processAttribute(String, String, String, String, String)} and a single call to
+     * {@link #attributesCompleted()}.
      * 
-     * @param prefix
-     *            the prefix of the element; never <code>null</code>
      * @param namespaceURI
      *            the namespace URI of the element; never <code>null</code>
      * @param localName
      *            the local name of the element; never <code>null</code>
-     * @throws OutputException
+     * @param prefix
+     *            the prefix of the element; never <code>null</code>
+     * @throws StreamException
      */
-    protected abstract void beginStartElement(String prefix, String namespaceURI, String localName) throws OutputException;
+    public abstract void startElement(String namespaceURI, String localName, String prefix) throws StreamException;
     
     /**
      * Add the given namespace to the element. The implementation of this method must take the
@@ -334,57 +337,57 @@ public abstract class Serializer {
      *            the namespace prefix; never <code>null</code>
      * @param namespaceURI
      *            the namespace URI; never <code>null</code>
-     * @throws OutputException
+     * @throws StreamException
      */
-    protected abstract void addNamespace(String prefix, String namespaceURI) throws OutputException;
+    public abstract void processNamespaceDeclaration(String prefix, String namespaceURI) throws StreamException;
     
     /**
      * Add the given attribute to the element.
      * 
-     * @param prefix
-     *            the namespace prefix of the attribute; never <code>null</code>
      * @param namespaceURI
      *            the namespace URI or the attribute; never <code>null</code>
      * @param localName
      *            the local name of the attribute; never <code>null</code>
-     * @param type
-     *            the attribute type (e.g. <tt>CDATA</tt>); never <code>null</code>
+     * @param prefix
+     *            the namespace prefix of the attribute; never <code>null</code>
      * @param value
      *            the value of the attribute; never <code>null</code>
-     * @throws OutputException
+     * @param type
+     *            the attribute type (e.g. <tt>CDATA</tt>); never <code>null</code>
+     * @throws StreamException
      */
-    protected abstract void addAttribute(String prefix, String namespaceURI, String localName, String type, String value) throws OutputException;
+    public abstract void processAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) throws StreamException;
     
-    protected abstract void finishStartElement() throws OutputException;
+    public abstract void attributesCompleted() throws StreamException;
     
-    public abstract void writeEndElement() throws OutputException;
+    public abstract void endElement() throws StreamException;
     
-    public abstract void writeText(int type, String data) throws OutputException;
+    public abstract void writeText(int type, String data) throws StreamException;
     
-    public abstract void writeComment(String data) throws OutputException;
+    public abstract void processComment(String data) throws StreamException;
 
-    public abstract void writeProcessingInstruction(String target, String data) throws OutputException;
+    public abstract void processProcessingInstruction(String target, String data) throws StreamException;
     
-    public abstract void writeEntityRef(String name) throws OutputException;
+    public abstract void processEntityReference(String name, String replacementText) throws StreamException;
     
-    public abstract void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws OutputException;
+    public abstract void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws StreamException;
 
-    public abstract void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws OutputException;
+    public abstract void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws StreamException;
 
     /**
      * Serialize the given data source using {@link OMDataSource#serialize(XMLStreamWriter)}. The
      * implementation must construct an appropriate {@link XMLStreamWriter} instance to pass to that
      * method and wrap any {@link XMLStreamException} that may be thrown in an
-     * {@link OutputException} or {@link DeferredParsingException}.
+     * {@link StreamException} or {@link DeferredParsingException}.
      * 
      * @param dataSource
      *            the data source to serialize
-     * @throws OutputException
+     * @throws StreamException
      *             if an error occurs while writing the data
      * @throws DeferredParsingException
      *             if an error occurs while reading from the data source
      */
-    protected abstract void serializePushOMDataSource(OMDataSource dataSource) throws OutputException;
+    protected abstract void serializePushOMDataSource(OMDataSource dataSource) throws StreamException;
     
-    public abstract void writeEndDocument() throws OutputException;
+    public abstract void endDocument() throws StreamException;
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/SAXSerializer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/SAXSerializer.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/SAXSerializer.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/SAXSerializer.java Sun Feb  7 13:34:12 2016
@@ -28,8 +28,8 @@ import org.apache.axiom.ext.stax.datahan
 import org.apache.axiom.om.OMDataSource;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMSerializable;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.util.base64.Base64EncodingWriterOutputStream;
 import org.apache.axiom.util.namespace.ScopedNamespaceContext;
 import org.xml.sax.ContentHandler;
@@ -51,39 +51,39 @@ public class SAXSerializer extends Seria
         this.lexicalHandler = lexicalHandler;
     }
 
-    protected boolean isAssociated(String prefix, String namespace) throws OutputException {
+    protected boolean isAssociated(String prefix, String namespace) throws StreamException {
         return nsContext.getNamespaceURI(prefix).equals(namespace);
     }
 
-    private void writeStartDocument() throws OutputException {
+    private void writeStartDocument() throws StreamException {
         try {
             contentHandler.startDocument();
             startDocumentWritten = true;
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
     
-    public void writeStartDocument(String version) throws OutputException {
+    public void writeStartDocument(String version) throws StreamException {
         writeStartDocument();
     }
 
-    public void writeStartDocument(String encoding, String version) throws OutputException {
+    public void writeStartDocument(String encoding, String version) throws StreamException {
         writeStartDocument();
     }
 
-    public void writeDTD(String rootName, String publicId, String systemId, String internalSubset) throws OutputException {
+    public void processDocumentTypeDeclaration(String rootName, String publicId, String systemId, String internalSubset) throws StreamException {
         if (lexicalHandler != null) {
             try {
                 lexicalHandler.startDTD(rootName, publicId, systemId);
                 lexicalHandler.endDTD();
             } catch (SAXException ex) {
-                throw new OutputException(ex);
+                throw new StreamException(ex);
             }
         }
     }
 
-    protected void beginStartElement(String prefix, String namespaceURI, String localName) throws OutputException {
+    public void startElement(String namespaceURI, String localName, String prefix) throws StreamException {
         if (!startDocumentWritten) {
             writeStartDocument();
             autoStartDocument = true;
@@ -93,40 +93,40 @@ public class SAXSerializer extends Seria
         depth++;
     }
 
-    protected void addNamespace(String prefix, String namespaceURI) throws OutputException {
+    public void processNamespaceDeclaration(String prefix, String namespaceURI) throws StreamException {
         nsContext.setPrefix(prefix, namespaceURI);
         try {
             contentHandler.startPrefixMapping(prefix, namespaceURI);
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
         // TODO: depending on the http://xml.org/sax/features/xmlns-uris feature, we also need to add an attribute
     }
 
-    protected void addAttribute(String prefix, String namespaceURI, String localName, String type, String value) throws OutputException {
+    public void processAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) throws StreamException {
         helper.addAttribute(prefix, namespaceURI, localName, type, value);
     }
 
-    protected void finishStartElement() throws OutputException {
+    public void attributesCompleted() throws StreamException {
         try {
             helper.finishStartElement(contentHandler);
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEndElement() throws OutputException {
+    public void endElement() throws StreamException {
         try {
             helper.writeEndElement(contentHandler, nsContext);
             if (--depth == 0 && autoStartDocument) {
                 contentHandler.endDocument();
             }
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeText(int type, String data) throws OutputException {
+    public void writeText(int type, String data) throws StreamException {
         char[] ch = data.toCharArray();
         try {
             switch (type) {
@@ -146,38 +146,38 @@ public class SAXSerializer extends Seria
                     contentHandler.ignorableWhitespace(ch, 0, ch.length);
             }
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeComment(String data) throws OutputException {
+    public void processComment(String data) throws StreamException {
         if (lexicalHandler != null) {
             char[] ch = data.toCharArray();
             try {
                 lexicalHandler.comment(ch, 0, ch.length);
             } catch (SAXException ex) {
-                throw new OutputException(ex);
+                throw new StreamException(ex);
             }
         }
     }
 
-    public void writeProcessingInstruction(String target, String data) throws OutputException {
+    public void processProcessingInstruction(String target, String data) throws StreamException {
         try {
             contentHandler.processingInstruction(target, data);
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEntityRef(String name) throws OutputException {
+    public void processEntityReference(String name, String replacementText) throws StreamException {
         try {
             contentHandler.skippedEntity(name);
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws OutputException {
+    public void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws StreamException {
         Base64EncodingWriterOutputStream out = new Base64EncodingWriterOutputStream(new ContentHandlerWriter(contentHandler), 4096, true);
         try {
             dataHandler.writeTo(out);
@@ -190,17 +190,17 @@ public class SAXSerializer extends Seria
             } else {
                 saxException = new SAXException(ex);
             }
-            throw new OutputException(saxException);
+            throw new StreamException(saxException);
         }
     }
 
     public void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID,
-            boolean optimize) throws OutputException {
+            boolean optimize) throws StreamException {
         // TODO
         throw new UnsupportedOperationException();
     }
 
-    protected void serializePushOMDataSource(OMDataSource dataSource) throws OutputException {
+    protected void serializePushOMDataSource(OMDataSource dataSource) throws StreamException {
         try {
             XMLStreamWriter writer = new ContentHandlerXMLStreamWriter(helper, contentHandler, lexicalHandler, nsContext);
             if (startDocumentWritten) {
@@ -211,19 +211,19 @@ public class SAXSerializer extends Seria
                 contentHandler.endDocument();
             }
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         } catch (SAXExceptionWrapper ex) {
-            throw new OutputException(ex.getCause());
+            throw new StreamException(ex.getCause());
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEndDocument() throws OutputException {
+    public void endDocument() throws StreamException {
         try {
             contentHandler.endDocument();
         } catch (SAXException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/XMLReaderImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/XMLReaderImpl.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/XMLReaderImpl.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/sax/XMLReaderImpl.java Sun Feb  7 13:34:12 2016
@@ -21,8 +21,8 @@ package org.apache.axiom.om.impl.common.
 import java.io.IOException;
 
 import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.intf.AxiomContainer;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.util.sax.AbstractXMLReader;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -48,7 +48,7 @@ public class XMLReaderImpl extends Abstr
         try {
             root.internalSerialize(new SAXSerializer(root, contentHandler, lexicalHandler),
                     new OMOutputFormat(), cache);
-        } catch (OutputException ex) {
+        } catch (StreamException ex) {
             throw (SAXException)ex.getCause();
         }
     }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/stax/StAXSerializer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/stax/StAXSerializer.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/stax/StAXSerializer.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/stax/StAXSerializer.java Sun Feb  7 13:34:12 2016
@@ -26,8 +26,8 @@ import org.apache.axiom.om.OMDataSource;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMSerializable;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.util.stax.XMLStreamWriterUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -48,50 +48,50 @@ public class StAXSerializer extends Seri
         this.writer = writer;
     }
 
-    protected void serializePushOMDataSource(OMDataSource dataSource) throws OutputException {
+    protected void serializePushOMDataSource(OMDataSource dataSource) throws StreamException {
         try {
             dataSource.serialize(writer);
         } catch (XMLStreamException ex) {
             // We cannot really differentiate between exceptions thrown by the XMLStreamWriter
             // and exceptions thrown by the data source itself. We wrap all XMLStreamExceptions
             // as OutputExceptions.
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeStartDocument(String version) throws OutputException {
+    public void writeStartDocument(String version) throws StreamException {
         try {
             writer.writeStartDocument(version);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeStartDocument(String encoding, String version) throws OutputException {
+    public void writeStartDocument(String encoding, String version) throws StreamException {
         try {
             writer.writeStartDocument(encoding, version);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeDTD(String rootName, String publicId, String systemId, String internalSubset) throws OutputException {
+    public void processDocumentTypeDeclaration(String rootName, String publicId, String systemId, String internalSubset) throws StreamException {
         try {
             XMLStreamWriterUtils.writeDTD(writer, rootName, publicId, systemId, internalSubset);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    protected void beginStartElement(String prefix, String namespaceURI, String localName) throws OutputException {
+    public void startElement(String namespaceURI, String localName, String prefix) throws StreamException {
         try {
             writer.writeStartElement(prefix, localName, namespaceURI);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    protected void addNamespace(String prefix, String namespaceURI) throws OutputException {
+    public void processNamespaceDeclaration(String prefix, String namespaceURI) throws StreamException {
         try {
             if (prefix.length() != 0) {
                 writer.writeNamespace(prefix, namespaceURI);
@@ -99,19 +99,19 @@ public class StAXSerializer extends Seri
                 writer.writeDefaultNamespace(namespaceURI);
             }
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    protected void addAttribute(String prefix, String namespaceURI, String localName, String type, String value) throws OutputException {
+    public void processAttribute(String namespaceURI, String localName, String prefix, String value, String type, boolean specified) throws StreamException {
         try {
             writer.writeAttribute(prefix, namespaceURI, localName, value);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    protected void finishStartElement() throws OutputException {
+    public void attributesCompleted() throws StreamException {
         // Nothing to do here
     }
 
@@ -120,7 +120,7 @@ public class StAXSerializer extends Seri
      * @param namespace
      * @return true if the prefix is associated with the namespace in the current context
      */
-    protected boolean isAssociated(String prefix, String namespace) throws OutputException {
+    protected boolean isAssociated(String prefix, String namespace) throws StreamException {
         try {
             // The "xml" prefix is always (implicitly) associated. Returning true here makes sure that
             // we never write a declaration for the xml namespace. See AXIOM-37 for a discussion
@@ -192,19 +192,19 @@ public class StAXSerializer extends Seri
                 return true;
             }
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEndElement() throws OutputException {
+    public void endElement() throws StreamException {
         try {
             writer.writeEndElement();
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeText(int type, String data) throws OutputException {
+    public void writeText(int type, String data) throws StreamException {
         try {
             if (type == OMNode.CDATA_SECTION_NODE) {
                 writer.writeCData(data);
@@ -212,31 +212,31 @@ public class StAXSerializer extends Seri
                 writer.writeCharacters(data);
             }
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeComment(String data) throws OutputException {
+    public void processComment(String data) throws StreamException {
         try {
             writer.writeComment(data);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeProcessingInstruction(String target, String data) throws OutputException {
+    public void processProcessingInstruction(String target, String data) throws StreamException {
         try {
             writer.writeProcessingInstruction(target, data);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEntityRef(String name) throws OutputException {
+    public void processEntityReference(String name, String replacementText) throws StreamException {
         try {
             writer.writeEntityRef(name);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
@@ -248,27 +248,27 @@ public class StAXSerializer extends Seri
         return dataHandlerWriter;
     }
 
-    public void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws OutputException {
+    public void writeDataHandler(DataHandler dataHandler, String contentID, boolean optimize) throws StreamException {
         try {
             getDataHandlerWriter().writeDataHandler(dataHandler, contentID, optimize);
         } catch (IOException ex) {
-            throw new OutputException("Error while reading data handler", ex);
+            throw new StreamException("Error while reading data handler", ex);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws OutputException {
+    public void writeDataHandler(DataHandlerProvider dataHandlerProvider, String contentID, boolean optimize) throws StreamException {
         try {
             getDataHandlerWriter().writeDataHandler(dataHandlerProvider, contentID, optimize);
         } catch (IOException ex) {
-            throw new OutputException("Error while reading data handler", ex);
+            throw new StreamException("Error while reading data handler", ex);
         } catch (XMLStreamException ex) {
-            throw new OutputException(ex);
+            throw new StreamException(ex);
         }
     }
 
-    public void writeEndDocument() throws OutputException {
+    public void endDocument() throws StreamException {
         // TODO: the original StAX serialization code newer called writeEndDocument; this is probably a mistake
     }
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/intf/AxiomSerializable.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/intf/AxiomSerializable.java?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/intf/AxiomSerializable.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/intf/AxiomSerializable.java Sun Feb  7 13:34:12 2016
@@ -21,8 +21,8 @@ package org.apache.axiom.om.impl.intf;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.OMSerializable;
 import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public interface AxiomSerializable extends OMSerializable, AxiomInformationItem {
     OMXMLParserWrapper getBuilder();
@@ -35,7 +35,7 @@ public interface AxiomSerializable exten
      * @param serializer
      * @param format
      * @param cache indicates if caching should be enabled
-     * @throws OutputException 
+     * @throws StreamException 
      */
-    void internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException;
+    void internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException;
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomCommentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomCommentSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomCommentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomCommentSupport.aj Sun Feb  7 13:34:12 2016
@@ -21,9 +21,9 @@ package org.apache.axiom.om.impl.mixin;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.common.AxiomSemantics;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomComment;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomCommentSupport {
     public final int AxiomComment.getType() {
@@ -38,8 +38,8 @@ public aspect AxiomCommentSupport {
         coreSetCharacterData(text, AxiomSemantics.INSTANCE);
     }
     
-    public final void AxiomComment.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
-        serializer.writeComment(coreGetCharacterData().toString());
+    public final void AxiomComment.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
+        serializer.processComment(coreGetCharacterData().toString());
     }
     
     public final void AxiomComment.buildWithAttachments() {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomContainerSupport.aj Sun Feb  7 13:34:12 2016
@@ -56,13 +56,13 @@ import org.apache.axiom.om.impl.common.O
 import org.apache.axiom.om.impl.common.SAXResultContentHandler;
 import org.apache.axiom.om.impl.common.serializer.pull.OMXMLStreamReaderExAdapter;
 import org.apache.axiom.om.impl.common.serializer.pull.PullSerializer;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.common.serializer.push.sax.XMLReaderImpl;
 import org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer;
 import org.apache.axiom.om.impl.intf.AxiomChildNode;
 import org.apache.axiom.om.impl.intf.AxiomContainer;
 import org.apache.axiom.om.impl.intf.OMFactoryEx;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.om.util.OMXMLStreamReaderValidator;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
@@ -298,7 +298,7 @@ public aspect AxiomContainerSupport {
         try {
             try {
                 internalSerialize(new StAXSerializer(this, writer), format, true);
-            } catch (OutputException ex) {
+            } catch (StreamException ex) {
                 throw AxiomExceptionTranslator.toXMLStreamException(ex);
             }
         } finally {
@@ -313,7 +313,7 @@ public aspect AxiomContainerSupport {
         try {
             try {
                 internalSerialize(new StAXSerializer(this, writer), format, true);
-            } catch (OutputException ex) {
+            } catch (StreamException ex) {
                 throw AxiomExceptionTranslator.toXMLStreamException(ex);
             }
         } finally {
@@ -327,7 +327,7 @@ public aspect AxiomContainerSupport {
         try {
             try {
                 internalSerialize(new StAXSerializer(this, writer), format, false);
-            } catch (OutputException ex) {
+            } catch (StreamException ex) {
                 throw AxiomExceptionTranslator.toXMLStreamException(ex);
             }
         } finally {
@@ -343,7 +343,7 @@ public aspect AxiomContainerSupport {
         try {
             try {
                 internalSerialize(new StAXSerializer(this, writer), format, false);
-            } catch (OutputException ex) {
+            } catch (StreamException ex) {
                 throw AxiomExceptionTranslator.toXMLStreamException(ex);
             }
         } finally {
@@ -351,7 +351,7 @@ public aspect AxiomContainerSupport {
         }
     }
 
-    final void AxiomContainer.serializeChildren(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
+    final void AxiomContainer.serializeChildren(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
         if (getState() == AxiomContainer.DISCARDED) {
             Builder builder = (Builder)getBuilder();
             if (builder != null) {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocTypeSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocTypeSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocTypeSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocTypeSupport.aj Sun Feb  7 13:34:12 2016
@@ -19,9 +19,9 @@
 package org.apache.axiom.om.impl.mixin;
 
 import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomDocType;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomDocTypeSupport {
     public final int AxiomDocType.getType() {
@@ -32,8 +32,8 @@ public aspect AxiomDocTypeSupport {
         return coreGetRootName();
     }
 
-    public final void AxiomDocType.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
-        serializer.writeDTD(coreGetRootName(), coreGetPublicId(), coreGetSystemId(), coreGetInternalSubset());
+    public final void AxiomDocType.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
+        serializer.processDocumentTypeDeclaration(coreGetRootName(), coreGetPublicId(), coreGetSystemId(), coreGetInternalSubset());
     }
     
     public final void AxiomDocType.buildWithAttachments() {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocumentSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocumentSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocumentSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomDocumentSupport.aj Sun Feb  7 13:34:12 2016
@@ -23,10 +23,10 @@ import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.common.AxiomSemantics;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomDocument;
 import org.apache.axiom.om.impl.intf.AxiomElement;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomDocumentSupport {
     public final OMElement AxiomDocument.getOMDocumentElement() {
@@ -45,13 +45,13 @@ public aspect AxiomDocumentSupport {
         }
     }
 
-    public final void AxiomDocument.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
+    public final void AxiomDocument.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
         internalSerialize(serializer, format, cache, !format.isIgnoreXMLDeclaration());
     }
 
     // Overridden in AxiomSOAPMessageSupport
     public void AxiomDocument.internalSerialize(Serializer serializer, OMOutputFormat format,
-            boolean cache, boolean includeXMLDeclaration) throws OutputException {
+            boolean cache, boolean includeXMLDeclaration) throws StreamException {
         if (includeXMLDeclaration) {
             //Check whether the OMOutput char encoding and OMDocument char
             //encoding matches, if not use char encoding of OMOutput
@@ -70,7 +70,7 @@ public aspect AxiomDocumentSupport {
             }
         }
         serializeChildren(serializer, format, cache);
-        serializer.writeEndDocument();
+        serializer.endDocument();
     }
 
     public final String AxiomDocument.getCharsetEncoding() {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomElementSupport.aj Sun Feb  7 13:34:12 2016
@@ -59,12 +59,12 @@ import org.apache.axiom.om.impl.common.N
 import org.apache.axiom.om.impl.common.NamespaceDeclarationMapper;
 import org.apache.axiom.om.impl.common.NamespaceIterator;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomAttribute;
 import org.apache.axiom.om.impl.intf.AxiomContainer;
 import org.apache.axiom.om.impl.intf.AxiomElement;
 import org.apache.axiom.om.impl.intf.AxiomNamespaceDeclaration;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.axiom.util.namespace.MapBasedNamespaceContext;
 import org.apache.axiom.util.stax.XMLStreamIOException;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
@@ -525,15 +525,15 @@ public aspect AxiomElementSupport {
     }
 
     public void AxiomElement.internalSerialize(Serializer serializer, OMOutputFormat format,
-            boolean cache) throws OutputException {
+            boolean cache) throws StreamException {
         defaultInternalSerialize(serializer, format, cache);
     }
     
     public final void AxiomElement.defaultInternalSerialize(Serializer serializer, OMOutputFormat format,
-            boolean cache) throws OutputException {
+            boolean cache) throws StreamException {
         serializer.serializeStartpart(this);
         serializeChildren(serializer, format, cache);
-        serializer.writeEndElement();
+        serializer.endElement();
     }
 
     public final String AxiomElement.toStringWithConsume() throws XMLStreamException {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomEntityReferenceSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomEntityReferenceSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomEntityReferenceSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomEntityReferenceSupport.aj Sun Feb  7 13:34:12 2016
@@ -20,17 +20,17 @@ package org.apache.axiom.om.impl.mixin;
 
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMOutputFormat;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomEntityReference;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomEntityReferenceSupport {
     public final int AxiomEntityReference.getType() {
         return OMNode.ENTITY_REFERENCE_NODE;
     }
 
-    public final void AxiomEntityReference.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
-        serializer.writeEntityRef(coreGetName());
+    public final void AxiomEntityReference.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
+        serializer.processEntityReference(coreGetName(), coreGetReplacementText());
     }
 
     public final String AxiomEntityReference.getName() {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomProcessingInstructionSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomProcessingInstructionSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomProcessingInstructionSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomProcessingInstructionSupport.aj Sun Feb  7 13:34:12 2016
@@ -20,9 +20,9 @@ package org.apache.axiom.om.impl.mixin;
 
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.common.AxiomSemantics;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomProcessingInstruction;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomProcessingInstructionSupport {
     public final int AxiomProcessingInstruction.getType() {
@@ -41,8 +41,8 @@ public aspect AxiomProcessingInstruction
         coreSetCharacterData(value, AxiomSemantics.INSTANCE);
     }
     
-    public final void AxiomProcessingInstruction.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
-        serializer.writeProcessingInstruction(coreGetTarget() + " ", coreGetCharacterData().toString());
+    public final void AxiomProcessingInstruction.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
+        serializer.processProcessingInstruction(coreGetTarget() + " ", coreGetCharacterData().toString());
     }
     
     public final void AxiomProcessingInstruction.buildWithAttachments() {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSerializableSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSerializableSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSerializableSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSerializableSupport.aj Sun Feb  7 13:34:12 2016
@@ -25,9 +25,9 @@ import org.apache.axiom.om.OMXMLParserWr
 import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
 import org.apache.axiom.om.impl.builder.Builder;
 import org.apache.axiom.om.impl.common.AxiomExceptionTranslator;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer;
 import org.apache.axiom.om.impl.intf.AxiomSerializable;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomSerializableSupport {
     public final void AxiomSerializable.serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
@@ -45,7 +45,7 @@ public aspect AxiomSerializableSupport {
                     new MTOMXMLStreamWriter(xmlWriter);
         try {
             internalSerialize(new StAXSerializer(this, writer), writer.getOutputFormat(), cache);
-        } catch (OutputException ex) {
+        } catch (StreamException ex) {
             throw AxiomExceptionTranslator.toXMLStreamException(ex);
         }
         writer.flush();

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementSupport.aj Sun Feb  7 13:34:12 2016
@@ -35,10 +35,10 @@ import org.apache.axiom.om.impl.common.D
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.common.builder.PushOMBuilder;
 import org.apache.axiom.om.impl.common.builder.StAXOMBuilder;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.common.util.OMDataSourceUtil;
 import org.apache.axiom.om.impl.intf.AxiomSourcedElement;
+import org.apache.axiom.om.impl.stream.StreamException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -401,7 +401,7 @@ public aspect AxiomSourcedElementSupport
     }
 
     public void AxiomSourcedElement.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache)
-            throws OutputException {
+            throws StreamException {
         if (isExpanded()) {
             defaultInternalSerialize(serializer, format, cache);
         } else if (cache) {

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomTextSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomTextSupport.aj?rev=1728960&r1=1728959&r2=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomTextSupport.aj (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/mixin/AxiomTextSupport.aj Sun Feb  7 13:34:12 2016
@@ -28,10 +28,10 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMOutputFormat;
 import org.apache.axiom.om.impl.common.AxiomSemantics;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
-import org.apache.axiom.om.impl.common.serializer.push.OutputException;
 import org.apache.axiom.om.impl.common.serializer.push.Serializer;
 import org.apache.axiom.om.impl.intf.AxiomText;
 import org.apache.axiom.om.impl.intf.TextContent;
+import org.apache.axiom.om.impl.stream.StreamException;
 
 public aspect AxiomTextSupport {
     private TextContent AxiomText.getTextContent(boolean force) {
@@ -116,7 +116,7 @@ public aspect AxiomTextSupport {
         return getTextContent(true).getContentID();
     }
 
-    public final void AxiomText.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws OutputException {
+    public final void AxiomText.internalSerialize(Serializer serializer, OMOutputFormat format, boolean cache) throws StreamException {
         Object content = coreGetCharacterData();
         if (content instanceof TextContent) {
             TextContent textContent = (TextContent)content;

Copied: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/StreamException.java (from r1728954, webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/OutputException.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/StreamException.java?p2=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/StreamException.java&p1=webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/OutputException.java&r1=1728954&r2=1728960&rev=1728960&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/serializer/push/OutputException.java (original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/stream/StreamException.java Sun Feb  7 13:34:12 2016
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.om.impl.common.serializer.push;
+package org.apache.axiom.om.impl.stream;
 
 /**
  * Wraps an exception thrown by the underlying API (StAX, SAX, etc.) while writing data.
  */
-public class OutputException extends Exception {
+public class StreamException extends Exception {
     private static final long serialVersionUID = 7173617216602466028L;
 
-    public OutputException(String message, Throwable cause) {
+    public StreamException(String message, Throwable cause) {
         super(message, cause);
     }
 
-    public OutputException(Throwable cause) {
+    public StreamException(Throwable cause) {
         super(cause);
     }
 }




Mime
View raw message