You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2013/01/01 11:18:23 UTC

svn commit: r1427339 [1/2] - in /webservices/axiom/branches/AXIOM-201: ./ code-coverage/ modules/axiom-api/src/main/java/org/apache/axiom/locator/ modules/axiom-api/src/main/java/org/apache/axiom/om/ modules/axiom-api/src/main/java/org/apache/axiom/om/...

Author: veithen
Date: Tue Jan  1 10:18:22 2013
New Revision: 1427339

URL: http://svn.apache.org/viewvc?rev=1427339&view=rev
Log:
Merged latest changes from trunk.

Added:
    webservices/axiom/branches/AXIOM-201/code-coverage/   (props changed)
      - copied from r1427338, webservices/commons/trunk/modules/axiom/code-coverage/
    webservices/axiom/branches/AXIOM-201/code-coverage/pom.xml
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/code-coverage/pom.xml
    webservices/axiom/branches/AXIOM-201/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/serialize/
      - copied from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/serialize/
    webservices/axiom/branches/AXIOM-201/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/serialize/StreamWriterToContentHandlerConverter.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-compat/src/main/java/org/apache/axiom/om/impl/serialize/StreamWriterToContentHandlerConverter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestAddChildDiscarded.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestAddChildDiscarded.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestBuildDiscarded.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestBuildDiscarded.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderGetDataHandlerFromElement.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderGetDataHandlerFromElement.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderWithIncompleteDescendant.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderWithIncompleteDescendant.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestDocument.java
      - copied unchanged from r1427338, webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestDocument.java
Removed:
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/serialize/StreamWriterToContentHandlerConverter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLMessages.properties
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/resources/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.properties
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/OMSourcedElementTest.java
Modified:
    webservices/axiom/branches/AXIOM-201/   (props changed)
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/PriorityBasedOMMetaFactoryLocator.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMNavigator.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/pom.xml
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/pom.xml
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestComplete.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestDataSource.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestExpand.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName1DefaultPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName1QualifiedPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName1Unqualified.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName2DefaultPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName2QualifiedPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName2Unqualified.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName3DefaultPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName3QualifiedPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName3Unqualified.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName4DefaultPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName4QualifiedPrefix.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestName4Unqualified.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeAndConsumeToStream.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeAndConsumeToWriter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeAndConsumeToXMLWriter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeAndConsumeToXMLWriterEmbedded.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeModifiedOMSEWithNonDestructiveDataSource.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToStream.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToWriter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToXMLWriter.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToXMLWriterEmbedded.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToXMLWriterFromReader.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSerializeToXMLWriterFromReaderEmbedded.java
    webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestSetDataSourceOnAlreadyExpandedElement.java
    webservices/axiom/branches/AXIOM-201/pom.xml
    webservices/axiom/branches/AXIOM-201/src/site/site.xml

Propchange: webservices/axiom/branches/AXIOM-201/
------------------------------------------------------------------------------
  Merged /webservices/commons/trunk/modules/axiom:r1426815-1427338

Propchange: webservices/axiom/branches/AXIOM-201/code-coverage/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan  1 10:18:22 2013
@@ -0,0 +1 @@
+target

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/DefaultOMMetaFactoryLocator.java Tue Jan  1 10:18:22 2013
@@ -68,13 +68,17 @@ public final class DefaultOMMetaFactoryL
 
         // Now discover the available implementations by looking for the axiom.xml descriptor.
         log.debug("Starting class path based discovery");
+        Enumeration e;
         try {
-            Enumeration e = classLoader.getResources(ImplementationFactory.DESCRIPTOR_RESOURCE);
+            e = classLoader.getResources(ImplementationFactory.DESCRIPTOR_RESOURCE);
+        } catch (IOException ex) {
+            log.error("Failed to look up " + ImplementationFactory.DESCRIPTOR_RESOURCE + " from class loader", ex);
+            e = null;
+        }
+        if (e != null) {
             while (e.hasMoreElements()) {
                 implementations.addAll(ImplementationFactory.parseDescriptor(loader, (URL)e.nextElement()));
             }
-        } catch (IOException ex) {
-            // Ignore and continue
         }
         
         loadImplementations(implementations);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/PriorityBasedOMMetaFactoryLocator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/PriorityBasedOMMetaFactoryLocator.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/PriorityBasedOMMetaFactoryLocator.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/locator/PriorityBasedOMMetaFactoryLocator.java Tue Jan  1 10:18:22 2013
@@ -44,7 +44,7 @@ class PriorityBasedOMMetaFactoryLocator 
                 String name = feature.getName();
                 int priority = feature.getPriority();
                 Integer highestPriority = (Integer)priorityMap.get(name);
-                if (highestPriority == null || priority > ((Integer)highestPriority).intValue()) {
+                if (highestPriority == null || priority > highestPriority.intValue()) {
                     priorityMap.put(name, Integer.valueOf(priority));
                     factories.put(name, implementation.getMetaFactory());
                 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMConstants.java Tue Jan  1 10:18:22 2013
@@ -23,12 +23,16 @@ import javax.xml.XMLConstants;
 
 /** Interface OMConstants */
 public interface OMConstants {
-
-    // OMBuilder constants
-    /** Field PUSH_TYPE_BUILDER */
+    /**
+     * @deprecated This constant is used as return value of
+     *             {@link OMXMLParserWrapper#getBuilderType()} which is deprecated.
+     */
     short PUSH_TYPE_BUILDER = 0;
 
-    /** Field PULL_TYPE_BUILDER */
+    /**
+     * @deprecated This constant is used as return value of
+     *             {@link OMXMLParserWrapper#getBuilderType()} which is deprecated.
+     */
     short PULL_TYPE_BUILDER = 1;
 
     /**

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLParserWrapper.java Tue Jan  1 10:18:22 2013
@@ -115,15 +115,21 @@ public interface OMXMLParserWrapper {
      * Returns the type of the builder. Can be either {@link OMConstants#PUSH_TYPE_BUILDER}
      * or {@link OMConstants#PULL_TYPE_BUILDER}.
      *
-     * @return Returns short.
+     * @return the type of the builder
+     * 
+     * @deprecated This method is no longer used.
      */
     short getBuilderType();
 
     /**
      * Registers an external content handler. Especially useful for push type builders. Throws an
-     * unsupportedOperationException if such handler registration is not supported.
-     *
+     * {@link UnsupportedOperationException} if such handler registration is not supported.
+     * 
      * @param obj
+     *            the external content handler
+     * 
+     * @deprecated This method is no longer used; implementations will always throw
+     *             {@link UnsupportedOperationException}.
      */
     void registerExternalContentHandler(Object obj);
 

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/builder/StAXBuilder.java Tue Jan  1 10:18:22 2013
@@ -535,14 +535,15 @@ public abstract class StAXBuilder implem
             parserAccessed = true;
             // Mark all containers in the hierarchy as discarded because they can no longer be built
             OMContainerEx current = target;
-            while (current != null) {
+            while (elementLevel > 0) {
                 discarded(current);
-                if (current instanceof OMElement) {
-                    current = (OMContainerEx)((OMElement)current).getParent();
-                } else {
-                    current = null;
-                }
+                current = (OMContainerEx)((OMElement)current).getParent();
+                elementLevel--;
             }
+            if (current != null && current == document) {
+                discarded(current);
+            }
+            target = null;
             return parser;
         } else {
             throw new IllegalStateException(

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerHelper.java Tue Jan  1 10:18:22 2013
@@ -142,6 +142,12 @@ public final class OMContainerHelper {
     
     public static void build(IContainer container) {
         OMXMLParserWrapper builder = container.getBuilder();
+        if (container.getState() == IContainer.DISCARDED) {
+            if (builder != null) {
+                ((StAXBuilder)builder).debugDiscarded(container);
+            }
+            throw new NodeUnavailableException();
+        }
         if (builder != null && builder.isCompleted()) {
             log.debug("Builder is already complete.");
         }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMNavigator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMNavigator.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMNavigator.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMNavigator.java Tue Jan  1 10:18:22 2013
@@ -44,7 +44,7 @@ public class OMNavigator {
     // root, the traversal is terminated
 
     /** Field root */
-    private OMSerializable root;
+    private OMContainer root;
 
     /** Field backtracked */
     private boolean backtracked;
@@ -61,30 +61,17 @@ public class OMNavigator {
     // be considered as an interior node or a leaf node.
     private boolean isDataSourceALeaf = false;
 
-    /** Constructor OMNavigator. */
-    public OMNavigator() {
-    }
-
     /**
      * Constructor OMNavigator.
      *
      * @param node
      */
-    public OMNavigator(OMSerializable node) {
-        init(node);
-    }
-
-    /**
-     * Method init.
-     *
-     * @param node
-     */
-    public void init(OMSerializable node) {
+    public OMNavigator(OMContainer node) {
         next = node;
         root = node;
         backtracked = false;
     }
-    
+
     /**
      * Indicate if an OMSourcedElement with a OMDataSource
      * should be considered as an interior element node or as
@@ -194,7 +181,8 @@ public class OMNavigator {
      * @return first child or null
      */
     private OMNode _getFirstChild(OMContainer node) {
-        if (isOMSourcedElement(node)) {
+        // TODO: We have a problem if the tree has parts constructed by different builders; this is related to AXIOM-201 and AXIOM-431
+        if (node.getBuilder() != root.getBuilder()) {
             OMNode first = node.getFirstOMChild();
             OMNode sibling = first;
             while (sibling != null) {

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMStAXWrapper.java Tue Jan  1 10:18:22 2013
@@ -48,19 +48,6 @@ class OMStAXWrapper extends StreamReader
     private XOPEncodingStreamReader xopEncoder;
     
     /**
-     * When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the
-     * OMXMLparserWrapper of the input) and the Element Node to start parsing. The wrapper will
-     * parse(proceed) until the end of the given element. Hence care should be taken to pass the
-     * root element if the entire document is needed.
-     *
-     * @param builder
-     * @param startNode
-     */
-    public OMStAXWrapper(OMXMLParserWrapper builder, OMContainer startNode) {
-        this(builder, startNode, false, false);
-    }
-
-    /**
      * Constructor OMStAXWrapper.
      *
      * @param builder

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java Tue Jan  1 10:18:22 2013
@@ -180,19 +180,6 @@ class SwitchingWrapper extends AbstractX
         // initiate the next and current nodes
         // Note - navigator is written in such a way that it first
         // returns the starting node at the first call to it
-        // Note - for OMSourcedElements, temporarily set caching
-        // to get the initial navigator nodes
-        boolean resetCache = false;
-        try {
-            if (startNode instanceof OMSourcedElement && 
-                    !cache && builder != null) {
-                if (!builder.isCache()) {
-                    resetCache = true;
-                }
-                builder.setCache(true); // bootstrap the navigator
-                
-            }
-        } catch(Throwable t) {}
         
         currentNode = navigator.getNext();
         updateNextNode(!cache);
@@ -206,10 +193,6 @@ class SwitchingWrapper extends AbstractX
         } else {
             currentEvent = START_DOCUMENT;
         }
-        
-        if (resetCache) {
-            builder.setCache(cache); 
-        }
     }
 
     /**
@@ -222,13 +205,7 @@ class SwitchingWrapper extends AbstractX
         } else {
             if ((currentEvent == START_ELEMENT)
                     || (currentEvent == END_ELEMENT)) {
-                OMNamespace ns = ((OMElement) lastNode).getNamespace();
-                if (ns == null) {
-                    return null;
-                } else {
-                    String prefix = ns.getPrefix();
-                    return prefix.length() == 0 ? null : prefix; 
-                }
+                return ((OMElement)lastNode).getPrefix();
             } else {
                 throw new IllegalStateException();
             }
@@ -245,13 +222,7 @@ class SwitchingWrapper extends AbstractX
         } else {
             if ((currentEvent == START_ELEMENT)
                     || (currentEvent == END_ELEMENT)) {
-                OMNamespace ns = ((OMElement) lastNode).getNamespace();
-                if (ns == null) {
-                    return null;
-                } else {
-                    String namespaceURI = ns.getNamespaceURI();
-                    return namespaceURI.length() == 0 ? null : namespaceURI;
-                }
+                return ((OMElement)lastNode).getNamespaceURI();
             } else {
                 throw new IllegalStateException();
             }
@@ -1446,8 +1417,8 @@ class SwitchingWrapper extends AbstractX
      */
     public OMDataSource getDataSource() {
         if (getEventType() != XMLStreamReader.START_ELEMENT ||
-                !(state == this.NAVIGABLE || 
-                  state == this.SWITCH_AT_NEXT)) {
+                !(state == NAVIGABLE || 
+                  state == SWITCH_AT_NEXT)) {
             return null;
         }
         OMDataSource ds = null;

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/pom.xml?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/pom.xml Tue Jan  1 10:18:22 2013
@@ -183,6 +183,27 @@
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-original-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
+                                    <classifier>original</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <!-- Attach a JAR with the test classes so that we can reuse them in other modules
                  (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
             <plugin>

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMMessageFormatter.java Tue Jan  1 10:18:22 2013
@@ -26,21 +26,7 @@ import java.util.ResourceBundle;
 
 /** Used to format DOM error messages, using the system locale. */
 public class DOMMessageFormatter {
-    public static final String DOM_DOMAIN = "http://www.w3.org/dom/DOMTR";
-
-    public static final String XML_DOMAIN =
-            "http://www.w3.org/TR/1998/REC-xml-19980210";
-
-    public static final String SERIALIZER_DOMAIN =
-            "http://apache.org/xml/serializer";
-
-    private static ResourceBundle domResourceBundle = null;
-
-    private static ResourceBundle xmlResourceBundle = null;
-
-    private static ResourceBundle serResourceBundle = null;
-
-    private static Locale locale = null;
+    private static final ResourceBundle resourceBundle;
 
     public static final String LEVEL3_NOT_SUPPORTED =
             "DOM Level 3 operations are not supported";
@@ -69,31 +55,22 @@ public class DOMMessageFormatter {
         "TYPE_MISMATCH_ERR",
     };
 
-    DOMMessageFormatter() {
-        locale = Locale.getDefault();
+    static {
+        resourceBundle = PropertyResourceBundle.getBundle(
+                "org.apache.axiom.om.impl.dom.msg.DOMMessages", Locale.getDefault());
     }
 
     /**
      * Formats a message with the specified arguments using the given locale information.
-     *
-     * @param domain    domain from which error string is to come.
      * @param key       The message key.
      * @param arguments The message replacement text arguments. The order of the arguments must
      *                  match that of the placeholders in the actual message.
+     *
      * @return Returns the formatted message.
      * @throws MissingResourceException Thrown if the message with the specified key cannot be
      *                                  found.
      */
-    public static String formatMessage(String domain, String key,
-                                       Object[] arguments) throws MissingResourceException {
-        ResourceBundle resourceBundle = getResourceBundle(domain);
-        if (resourceBundle == null) {
-            init();
-            resourceBundle = getResourceBundle(domain);
-            if (resourceBundle == null)
-                throw new MissingResourceException("Unknown domain" + domain,
-                                                   null, key);
-        }
+    public static String formatMessage(String key, Object[] arguments) throws MissingResourceException {
         // format message
         String msg;
         try {
@@ -130,48 +107,7 @@ public class DOMMessageFormatter {
         return msg;
     }
 
-    public static String formatMessage(String domain, int exceptionId,
-                                       Object[] arguments) throws MissingResourceException {
-        return formatMessage(domain, exceptionKeys[exceptionId-1], arguments);
-    }
-    
-    static ResourceBundle getResourceBundle(String domain) {
-        if (domain == DOM_DOMAIN || domain.equals(DOM_DOMAIN))
-            return domResourceBundle;
-        else if (domain == XML_DOMAIN || domain.equals(XML_DOMAIN))
-            return xmlResourceBundle;
-        else if (domain == SERIALIZER_DOMAIN
-                || domain.equals(SERIALIZER_DOMAIN))
-            return serResourceBundle;
-        return null;
-    }
-
-    /** Initializes Message Formatter. */
-    public static void init() {
-        if (locale != null) {
-            domResourceBundle = PropertyResourceBundle.getBundle(
-                    "org.apache.axiom.om.impl.dom.msg.DOMMessages", locale);
-            serResourceBundle = PropertyResourceBundle.getBundle(
-                    "org.apache.axiom.om.impl.dom.msg.XMLSerializerMessages",
-                    locale);
-            xmlResourceBundle = PropertyResourceBundle.getBundle(
-                    "org.apache.axiom.om.impl.dom.msg.XMLMessages", locale);
-        } else {
-            domResourceBundle = PropertyResourceBundle
-                    .getBundle("org.apache.axiom.om.impl.dom.msg.DOMMessages");
-            serResourceBundle = PropertyResourceBundle
-                    .getBundle("org.apache.axiom.om.impl.dom.msg.XMLSerializerMessages");
-            xmlResourceBundle = PropertyResourceBundle
-                    .getBundle("org.apache.axiom.om.impl.dom.msg.XMLMessages");
-        }
-    }
-
-    /**
-     * Sets Locale to be used by the formatter.
-     *
-     * @param dlocale
-     */
-    public static void setLocale(Locale dlocale) {
-        locale = dlocale;
+    public static String formatMessage(int exceptionId, Object[] arguments) throws MissingResourceException {
+        return formatMessage(exceptionKeys[exceptionId-1], arguments);
     }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/DOMUtil.java Tue Jan  1 10:18:22 2013
@@ -80,6 +80,6 @@ class DOMUtil {
     
     public static DOMException newDOMException(short code) {
         throw new DOMException(code, DOMMessageFormatter.formatMessage(
-                DOMMessageFormatter.DOM_DOMAIN, code, null));
+                code, null));
     }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/XMLChar.java Tue Jan  1 10:18:22 2013
@@ -40,35 +40,20 @@ public class XMLChar {
     /** Character flags. */
     private static final byte[] CHARS = new byte[1 << 16];
 
-    /** Valid character mask. */
-    public static final int MASK_VALID = 0x01;
-
     /** Space character mask. */
-    public static final int MASK_SPACE = 0x02;
+    private static final int MASK_SPACE = 0x02;
 
     /** Name start character mask. */
-    public static final int MASK_NAME_START = 0x04;
+    private static final int MASK_NAME_START = 0x04;
 
     /** Name character mask. */
-    public static final int MASK_NAME = 0x08;
-
-    /** Pubid character mask. */
-    public static final int MASK_PUBID = 0x10;
-
-    /**
-     * Content character mask. Special characters are those that can be considered the start of
-     * markup, such as '&lt;' and '&amp;'. The various newline characters are considered special as
-     * well. All other valid XML characters can be considered content.
-     * <p/>
-     * This is an optimization for the inner loop of character scanning.
-     */
-    public static final int MASK_CONTENT = 0x20;
+    private static final int MASK_NAME = 0x08;
 
     /** NCName start character mask. */
-    public static final int MASK_NCNAME_START = 0x40;
+    private static final int MASK_NCNAME_START = 0x40;
 
     /** NCName character mask. */
-    public static final int MASK_NCNAME = 0x80;
+    private static final int MASK_NCNAME = 0x80;
 
     //
     // Static initialization
@@ -77,15 +62,6 @@ public class XMLChar {
     static {
 
         //
-        // [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] |
-        //              [#xE000-#xFFFD] | [#x10000-#x10FFFF]
-        //
-
-        int charRange[] = {
-                0x0009, 0x000A, 0x000D, 0x000D, 0x0020, 0xD7FF, 0xE000, 0xFFFD,
-        };
-
-        //
         // [3] S ::= (#x20 | #x9 | #xD | #xA)+
         //
 
@@ -111,19 +87,6 @@ public class XMLChar {
         };
 
         //
-        // [13] PubidChar ::= #x20 | 0xD | 0xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
-        //
-
-        int pubidChar[] = {
-                0x000A, 0x000D, 0x0020, 0x0021, 0x0023, 0x0024, 0x0025, 0x003D,
-                0x005F
-        };
-
-        int pubidRange[] = {
-                0x0027, 0x003B, 0x003F, 0x005A, 0x0061, 0x007A
-        };
-
-        //
         // [84] Letter ::= BaseChar | Ideographic
         //
 
@@ -238,29 +201,9 @@ public class XMLChar {
         };
 
         //
-        // SpecialChar ::= '<', '&', '\n', '\r', ']'
-        //
-
-        int specialChar[] = {
-                '<', '&', '\n', '\r', ']',
-        };
-
-        //
         // Initialize
         //
 
-        // set valid characters
-        for (int i = 0; i < charRange.length; i += 2) {
-            for (int j = charRange[i]; j <= charRange[i + 1]; j++) {
-                CHARS[j] |= MASK_VALID | MASK_CONTENT;
-            }
-        }
-
-        // remove special characters
-        for (int i = 0; i < specialChar.length; i++) {
-            CHARS[specialChar[i]] = (byte) (CHARS[specialChar[i]] & ~MASK_CONTENT);
-        }
-
         // set space characters
         for (int i = 0; i < spaceChar.length; i++) {
             CHARS[spaceChar[i]] |= MASK_SPACE;
@@ -311,121 +254,8 @@ public class XMLChar {
         // remove ':' from allowable MASK_NCNAME_START and MASK_NCNAME chars
         CHARS[':'] &= ~(MASK_NCNAME_START | MASK_NCNAME);
 
-        // set Pubid characters
-        for (int i = 0; i < pubidChar.length; i++) {
-            CHARS[pubidChar[i]] |= MASK_PUBID;
-        }
-        for (int i = 0; i < pubidRange.length; i += 2) {
-            for (int j = pubidRange[i]; j <= pubidRange[i + 1]; j++) {
-                CHARS[j] |= MASK_PUBID;
-            }
-        }
-
     } // <clinit>()
 
-    //
-    // Public static methods
-    //
-
-    /**
-     * Returns true if the specified character is a supplemental character.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isSupplemental(int c) {
-        return (c >= 0x10000 && c <= 0x10FFFF);
-    }
-
-    /**
-     * Returns true the supplemental character corresponding to the given surrogates.
-     *
-     * @param h The high surrogate.
-     * @param l The low surrogate.
-     */
-    public static int supplemental(char h, char l) {
-        return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000;
-    }
-
-    /**
-     * Returns the high surrogate of a supplemental character
-     *
-     * @param c The supplemental character to "split".
-     */
-    public static char highSurrogate(int c) {
-        return (char) (((c - 0x00010000) >> 10) + 0xD800);
-    }
-
-    /**
-     * Returns the low surrogate of a supplemental character
-     *
-     * @param c The supplemental character to "split".
-     */
-    public static char lowSurrogate(int c) {
-        return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00);
-    }
-
-    /**
-     * Returns whether the given character is a high surrogate
-     *
-     * @param c The character to check.
-     */
-    public static boolean isHighSurrogate(int c) {
-        return (0xD800 <= c && c <= 0xDBFF);
-    }
-
-    /**
-     * Returns whether the given character is a low surrogate
-     *
-     * @param c The character to check.
-     */
-    public static boolean isLowSurrogate(int c) {
-        return (0xDC00 <= c && c <= 0xDFFF);
-    }
-
-
-    /**
-     * Returns true if the specified character is valid. This method also checks the surrogate
-     * character range from 0x10000 to 0x10FFFF.
-     * <p/>
-     * If the program chooses to apply the mask directly to the <code>CHARS</code> array, then they
-     * are responsible for checking the surrogate character range.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isValid(int c) {
-        return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||
-                (0x10000 <= c && c <= 0x10FFFF);
-    } // isValid(int):boolean
-
-    /**
-     * Returns true if the specified character is invalid.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isInvalid(int c) {
-        return !isValid(c);
-    } // isInvalid(int):boolean
-
-    /**
-     * Returns true if the specified character can be considered content.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isContent(int c) {
-        return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) ||
-                (0x10000 <= c && c <= 0x10FFFF);
-    } // isContent(int):boolean
-
-    /**
-     * Returns true if the specified character can be considered markup. Markup characters include
-     * '&lt;', '&amp;', and '%'.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isMarkup(int c) {
-        return c == '<' || c == '&' || c == '%';
-    } // isMarkup(int):boolean
-
     /**
      * Returns true if the specified character is a space character as defined by production [3] in
      * the XML 1.0 specification.
@@ -487,16 +317,6 @@ public class XMLChar {
         return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0;
     } // isNCName(int):boolean
 
-    /**
-     * Returns true if the specified character is a valid Pubid character as defined by production
-     * [13] in the XML 1.0 specification.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isPubid(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0;
-    } // isPubid(int):boolean
-
     /*
      * [5] Name ::= (Letter | '_' | ':') (NameChar)*
      */
@@ -548,82 +368,4 @@ public class XMLChar {
         }
         return true;
     } // isValidNCName(String):boolean
-
-    /*
-     * [7] Nmtoken ::= (NameChar)+
-     */
-    /**
-     * Check to see if a string is a valid Nmtoken according to [7]
-     * in the XML 1.0 Recommendation
-     *
-     * @param nmtoken string to check
-     * @return true if nmtoken is a valid Nmtoken
-     */
-    public static boolean isValidNmtoken(String nmtoken) {
-        if (nmtoken.length() == 0)
-            return false;
-        for (int i = 0; i < nmtoken.length(); i++) {
-            char ch = nmtoken.charAt(i);
-            if (! isName(ch)) {
-                return false;
-            }
-        }
-        return true;
-    } // isValidName(String):boolean
-
-    // encodings
-
-    /**
-     * Returns true if the encoding name is a valid IANA encoding. This method does not verify that
-     * there is a decoder available for this encoding, only that the characters are valid for an
-     * IANA encoding name.
-     *
-     * @param ianaEncoding The IANA encoding name.
-     */
-    public static boolean isValidIANAEncoding(String ianaEncoding) {
-        if (ianaEncoding != null) {
-            int length = ianaEncoding.length();
-            if (length > 0) {
-                char c = ianaEncoding.charAt(0);
-                if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
-                    for (int i = 1; i < length; i++) {
-                        c = ianaEncoding.charAt(i);
-                        if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
-                                (c < '0' || c > '9') && c != '.' && c != '_' &&
-                                c != '-') {
-                            return false;
-                        }
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    } // isValidIANAEncoding(String):boolean
-
-    /**
-     * Returns true if the encoding name is a valid Java encoding. This method does not verify that
-     * there is a decoder available for this encoding, only that the characters are valid for an
-     * Java encoding name.
-     *
-     * @param javaEncoding The Java encoding name.
-     */
-    public static boolean isValidJavaEncoding(String javaEncoding) {
-        if (javaEncoding != null) {
-            int length = javaEncoding.length();
-            if (length > 0) {
-                for (int i = 1; i < length; i++) {
-                    char c = javaEncoding.charAt(i);
-                    if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
-                            (c < '0' || c > '9') && c != '.' && c != '_' &&
-                            c != '-') {
-                        return false;
-                    }
-                }
-                return true;
-            }
-        }
-        return false;
-    } // isValidIANAEncoding(String):boolean
-
 } // class XMLChar

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java Tue Jan  1 10:18:22 2013
@@ -24,14 +24,11 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
 import org.apache.axiom.soap.SOAPProcessingException;
 
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
 import java.util.Iterator;
 
 public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail {
@@ -56,20 +53,4 @@ public abstract class SOAPFaultDetailImp
     public Iterator getAllDetailEntries() {
         return this.getChildren();
     }
-
-    public void internalSerialize(XMLStreamWriter writer, boolean cache)
-            throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-
-        super.internalSerialize(writer, cache);
-    }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java Tue Jan  1 10:18:22 2013
@@ -27,7 +27,6 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ElementImpl;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPConstants;
@@ -149,18 +148,6 @@ public abstract class SOAPFaultImpl exte
 
     public void internalSerialize(XMLStreamWriter writer,
                                      boolean cache) throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER; // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder
-                    .registerExternalContentHandler(new StreamWriterToContentHandlerConverter(
-                            writer));
-        }
-
         // this is a special case. This fault element may contain its children
         // in any order. But spec mandates a specific order
         // the overriding of the method will facilitate that. Not sure this is

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java Tue Jan  1 10:18:22 2013
@@ -23,7 +23,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
@@ -65,17 +64,6 @@ public abstract class SOAPFaultNodeImpl 
     public void internalSerialize(
             XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(
-                    writer));
-        }
-
         if (!cache) {
             //No caching
             if (this.firstChild != null) {
@@ -83,14 +71,7 @@ public abstract class SOAPFaultNodeImpl 
                 firstChild.internalSerialize(writer, false);
                 OMSerializerUtil.serializeEndpart(writer);
             } else if (state == INCOMPLETE) {
-                if (builderType == PULL_TYPE_BUILDER) {
-                    OMSerializerUtil.serializeByPullStream(this, writer);
-                } else {
-                    OMSerializerUtil.serializeStartpart(this, writer);
-                    builder.setCache(cache);
-                    builder.next();
-                    OMSerializerUtil.serializeEndpart(writer);
-                }
+                OMSerializerUtil.serializeByPullStream(this, writer);
             } else {
                 OMSerializerUtil.serializeNormal(this, writer, cache);
             }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java Tue Jan  1 10:18:22 2013
@@ -23,7 +23,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
@@ -61,17 +60,6 @@ public abstract class SOAPFaultRoleImpl 
 
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-
         if (!cache) {
             //No caching
             if (this.firstChild != null) {
@@ -79,14 +67,7 @@ public abstract class SOAPFaultRoleImpl 
                 firstChild.internalSerialize(writer, false);
                 OMSerializerUtil.serializeEndpart(writer);
             } else if (state == INCOMPLETE) {
-                if (builderType == PULL_TYPE_BUILDER) {
-                    OMSerializerUtil.serializeByPullStream(this, writer);
-                } else {
-                    OMSerializerUtil.serializeStartpart(this, writer);
-                    builder.setCache(cache);
-                    builder.next();
-                    OMSerializerUtil.serializeEndpart(writer);
-                }
+                OMSerializerUtil.serializeByPullStream(this, writer);
             } else {
                 OMSerializerUtil.serializeNormal(this, writer, cache);
             }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultCodeImpl.java Tue Jan  1 10:18:22 2013
@@ -25,7 +25,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPFactory;
@@ -82,17 +81,6 @@ public class SOAP11FaultCodeImpl extends
             XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
 
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
                                             writer);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java Tue Jan  1 10:18:22 2013
@@ -25,7 +25,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPFactory;
@@ -65,17 +64,6 @@ public class SOAP11FaultReasonImpl exten
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
 
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,
                                             writer);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultRoleImpl.java Tue Jan  1 10:18:22 2013
@@ -25,7 +25,6 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.om.impl.util.OMSerializerUtil;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPFactory;
@@ -60,17 +59,6 @@ public class SOAP11FaultRoleImpl extends
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
 
-        // select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME,
                                             writer);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/OMImplementationTest.java Tue Jan  1 10:18:22 2013
@@ -28,6 +28,7 @@ import org.apache.axiom.ts.om.container.
 import org.apache.axiom.ts.om.document.TestClone;
 import org.apache.axiom.ts.om.document.TestDigest;
 import org.apache.axiom.ts.om.element.TestGetChildrenWithName4;
+import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant;
 import org.apache.axiom.ts.om.element.TestSerializationWithTwoNonBuiltOMElements;
 import org.apache.axiom.ts.om.factory.TestCreateOMElementWithGeneratedPrefix;
 import org.apache.axiom.ts.om.factory.TestCreateOMElementWithNamespaceInScope1;
@@ -62,6 +63,9 @@ public class OMImplementationTest extend
         // TODO
         builder.exclude(TestSerializationWithTwoNonBuiltOMElements.class);
         
+        // TODO: this is not supported yet
+        builder.exclude(TestGetXMLStreamReaderWithIncompleteDescendant.class, "(cache=false)");
+        
         return builder.build();
     }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/pom.xml?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/pom.xml (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/pom.xml Tue Jan  1 10:18:22 2013
@@ -166,6 +166,27 @@
                     </dependency>
                 </dependencies>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-original-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
+                                    <classifier>original</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <!-- Attach a JAR with the test classes so that we can reuse them in other modules
                  (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
             <plugin>

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPElement.java Tue Jan  1 10:18:22 2013
@@ -24,12 +24,9 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.llom.OMElementImpl;
-import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPProcessingException;
 
-import javax.xml.stream.XMLStreamWriter;
-
 public abstract class SOAPElement extends OMElementImpl {
 
     /**
@@ -81,25 +78,4 @@ public abstract class SOAPElement extend
             checkParent((OMElement) element);
         }
     }
-
-    /**
-     * Utility method to register a content handler for 
-     * push type builders.
-     * @param writer
-     * @return PULL_TYPE_BUILDER or PUSH_TYPE_BUILDER
-     */
-    protected short registerContentHandler(XMLStreamWriter writer) {
-        //  select the builder
-        short builderType = PULL_TYPE_BUILDER;    // default is pull type
-        if (builder != null) {
-            builderType = this.builder.getBuilderType();
-        }
-        if ((builderType == PUSH_TYPE_BUILDER)
-                && (builder.getRegisteredContentHandler() == null)) {
-            builder.registerExternalContentHandler(
-                    new StreamWriterToContentHandlerConverter(writer));
-        }
-        return builderType;
-    }
-
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultDetailImpl.java Tue Jan  1 10:18:22 2013
@@ -29,8 +29,6 @@ import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
 import org.apache.axiom.soap.SOAPProcessingException;
 
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
 import java.util.Iterator;
 
 public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail {
@@ -62,13 +60,6 @@ public abstract class SOAPFaultDetailImp
         return this.getChildren();
     }
 
-    public void internalSerialize(XMLStreamWriter writer, boolean cache)
-            throws XMLStreamException {
-        this.registerContentHandler(writer);
-
-        super.internalSerialize(writer, cache);
-    }
-
     protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
         return ((SOAPFactory)factory).createSOAPFaultDetail((SOAPFault)targetParent);
     }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java Tue Jan  1 10:18:22 2013
@@ -156,8 +156,6 @@ public abstract class SOAPFaultImpl exte
 
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-        this.registerContentHandler(writer);
-        
         // this is a special case. This fault element may contain its children in any order. But spec mandates a specific order
         // the overriding of the method will facilitate that. Not sure this is the best method to do this :(
         build();

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultCodeImpl.java Tue Jan  1 10:18:22 2013
@@ -75,8 +75,6 @@ public class SOAP11FaultCodeImpl extends
 
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-        this.registerContentHandler(writer);
-
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME,
                                             writer);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java Tue Jan  1 10:18:22 2013
@@ -66,8 +66,6 @@ public class SOAP11FaultReasonImpl exten
 
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-        this.registerContentHandler(writer);
-
         // Special syntax
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME,

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultRoleImpl.java Tue Jan  1 10:18:22 2013
@@ -57,8 +57,6 @@ public class SOAP11FaultRoleImpl extends
     public void internalSerialize(XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
 
-        this.registerContentHandler(writer);
-
         OMSerializerUtil.serializeStartpart(this,
                                             SOAP11Constants.SOAP_FAULT_ACTOR_LOCAL_NAME,
                                             writer);

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java Tue Jan  1 10:18:22 2013
@@ -26,10 +26,6 @@ import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.llom.SOAPFaultNodeImpl;
 
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-
 public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl {
 
     public SOAP12FaultNodeImpl(SOAPFactory factory) {
@@ -51,10 +47,4 @@ public class SOAP12FaultNodeImpl extends
                     "Expecting SOAP12FaultImpl, got " + parent.getClass());
         }
     }
-    
-    public void internalSerialize(XMLStreamWriter writer, boolean cache)
-    throws XMLStreamException {
-        this.registerContentHandler(writer);
-        super.internalSerialize(writer, cache);
-    }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultRoleImpl.java Tue Jan  1 10:18:22 2013
@@ -26,9 +26,6 @@ import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.llom.SOAPFaultRoleImpl;
 
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
 public class SOAP12FaultRoleImpl extends SOAPFaultRoleImpl {
 
     public SOAP12FaultRoleImpl(SOAPFault parent, SOAPFactory factory)
@@ -51,11 +48,4 @@ public class SOAP12FaultRoleImpl extends
                     "Expecting SOAP12FaultImpl, got " + parent.getClass());
         }
     }
-    
-    public void internalSerialize(XMLStreamWriter writer, boolean cache)
-    throws XMLStreamException {
-
-        this.registerContentHandler(writer);
-        super.internalSerialize(writer, cache);
-    }
 }

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMImplementationTest.java Tue Jan  1 10:18:22 2013
@@ -27,6 +27,7 @@ import org.apache.axiom.ts.om.builder.Te
 import org.apache.axiom.ts.om.container.TestSerialize;
 import org.apache.axiom.ts.om.document.TestClone;
 import org.apache.axiom.ts.om.document.TestDigest;
+import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant;
 import org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithOMSourcedElementDescendant;
 import org.apache.axiom.ts.om.node.TestInsertSiblingAfterOnChild;
 import org.apache.axiom.ts.om.node.TestInsertSiblingBeforeOnChild;
@@ -41,6 +42,9 @@ public class OMImplementationTest extend
         // AXIOM-201
         builder.exclude(TestGetXMLStreamReaderWithOMSourcedElementDescendant.class);
         
+        // TODO: this is not supported yet
+        builder.exclude(TestGetXMLStreamReaderWithIncompleteDescendant.class, "(cache=false)");
+        
         // TODO: this case is not working because Axiom generates an XML declaration
         //       but uses another charset encoding to serialize the document
         builder.exclude(TestSerialize.class, "(&(file=iso-8859-1.xml)(container=document))");

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java Tue Jan  1 10:18:22 2013
@@ -166,10 +166,12 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.element.TestAddAttributeWithoutNamespace(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestAddChild(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestAddChild2(metaFactory));
+        addTest(new org.apache.axiom.ts.om.element.TestAddChildDiscarded(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestAddChildIncomplete(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestAddChildWithParent(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestAddChildWithSameParent(metaFactory, true));
         addTest(new org.apache.axiom.ts.om.element.TestAddChildWithSameParent(metaFactory, false));
+        addTest(new org.apache.axiom.ts.om.element.TestBuildDiscarded(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringGrandParentsDefaultNSWithPrefix(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringParentsDefaultNSWithPrefix(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestCloneOMElement(metaFactory));
@@ -268,6 +270,8 @@ public class OMTestSuiteBuilder extends 
             addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderCommentEvent(metaFactory, bf, true));
             addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderCommentEvent(metaFactory, bf, false));
         }
+        addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderGetDataHandlerFromElement(metaFactory, true));
+        addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderGetDataHandlerFromElement(metaFactory, false));
         addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderGetElementText(metaFactory));
         for (int i=0; i<builderFactories.length; i++) {
             BuilderFactory bf = builderFactories[i];
@@ -280,6 +284,8 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElement(metaFactory, true));
         addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderOnNonRootElement(metaFactory, false));
         addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithCaching(metaFactory));
+        addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant(metaFactory, true));
+        addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithIncompleteDescendant(metaFactory, false));
         addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithNamespaceURIInterning(metaFactory));
         if (supportsOMSourcedElement) {
             addTest(new org.apache.axiom.ts.om.element.TestGetXMLStreamReaderWithOMSourcedElementDescendant(metaFactory));
@@ -461,7 +467,18 @@ public class OMTestSuiteBuilder extends 
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToWriter(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriter(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterEmbedded(metaFactory));
-            addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory));
+            for (int expand = 0; expand <= 2; expand++) {
+                for (int count = 1; count <= 2; count++) {
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, false, false, false, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, false, false, true, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, false, true, false, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, false, true, true, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, true, false, false, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, true, false, true, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, true, true, false, expand, count));
+                    addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReader(metaFactory, true, true, true, expand, count));
+                }
+            }
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSerializeToXMLWriterFromReaderEmbedded(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSetDataSource(metaFactory));
             addTest(new org.apache.axiom.ts.om.sourcedelement.TestSetDataSourceOnAlreadyExpandedElement(metaFactory));

Modified: webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestComplete.java
URL: http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestComplete.java?rev=1427339&r1=1427338&r2=1427339&view=diff
==============================================================================
--- webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestComplete.java (original)
+++ webservices/axiom/branches/AXIOM-201/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/sourcedelement/TestComplete.java Tue Jan  1 10:18:22 2013
@@ -22,12 +22,13 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.ts.AxiomTestCase;
 
 /**
  * Make sure that the incomplete setting of an OMSE is not 
  * propogated to the root
  **/
-public class TestComplete extends OMSourcedElementTest {
+public class TestComplete extends AxiomTestCase {
     public TestComplete(OMMetaFactory metaFactory) {
         super(metaFactory);
     }
@@ -37,7 +38,7 @@ public class TestComplete extends OMSour
         OMFactory f = metaFactory.getOMFactory();
         OMNamespace ns = f.createOMNamespace("http://www.sosnoski.com/uwjws/library", "");
         OMNamespace rootNS = f.createOMNamespace("http://sampleroot", "rootPrefix");
-        OMElement child = f.createOMElement(new TestDataSource(testDocument), "library", ns);
+        OMElement child = f.createOMElement(new TestDataSource(TestDocument.DOCUMENT1.getContent()), "library", ns);
         OMElement root = f.createOMElement("root", rootNS);
         
         // Trigger expansion of the child OMSE
@@ -56,7 +57,7 @@ public class TestComplete extends OMSour
         
         // Now repeat the test, but this time trigger the 
         // partial parsing of the child after adding it to the root.
-        child = f.createOMElement(new TestDataSource(testDocument), "library", ns);
+        child = f.createOMElement(new TestDataSource(TestDocument.DOCUMENT1.getContent()), "library", ns);
         root = f.createOMElement("root", rootNS);
         
         root.addChild(child);