ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1751136 - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/ axiom-api/ axiom-api/src/main/java/org/apache/axiom/om/ axiom-api/src/main/java/org/apache/axiom/om/util/ implementations/axio...
Date Sun, 03 Jul 2016 09:41:47 GMT
Author: veithen
Date: Sun Jul  3 09:41:47 2016
New Revision: 1751136

URL: http://svn.apache.org/viewvc?rev=1751136&view=rev
Log:
Move the SPI methods from OMMetaFactory to a separate interface.

Added:
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
      - copied, changed from r1748300, webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
    webservices/axiom/trunk/axiom-api/pom.xml
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/dimension/BuilderFactory.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCloseWithXMLStreamReader.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing2.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderCDATAEventFromParser.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestCloneBinary.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleAdapter.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestCase.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestSerializeWithXSITypeAttribute.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/om/impl/common/factory/AbstractOMMetaFactory.java
Sun Jul  3 09:41:47 2016
@@ -28,6 +28,7 @@ import javax.xml.transform.sax.SAXSource
 import org.apache.axiom.core.NodeFactory;
 import org.apache.axiom.mime.MimePartProvider;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.soap.SOAP12Constants;
@@ -41,7 +42,7 @@ import org.xml.sax.InputSource;
  * Base class for {@link OMMetaFactory} implementations that make use of the standard builders
  * ({@link org.apache.axiom.core.impl.builder.BuilderImpl} and its subclasses).
  */
-public abstract class AbstractOMMetaFactory implements OMMetaFactory {
+public abstract class AbstractOMMetaFactory implements OMMetaFactorySPI {
     private final NodeFactory nodeFactory;
     
     public AbstractOMMetaFactory(NodeFactory nodeFactory) {

Modified: webservices/axiom/trunk/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/pom.xml?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/pom.xml (original)
+++ webservices/axiom/trunk/axiom-api/pom.xml Sun Jul  3 09:41:47 2016
@@ -306,14 +306,15 @@
                                 <!-- o.a.a.soap should be a layer on top of o.a.a.om -->
                                 org.apache.axiom.om.OMAbstractFactory -> org.apache.axiom.soap.SOAPFactory,
                                 org.apache.axiom.om.OMMetaFactory -> org.apache.axiom.soap.SOAPFactory,
-                                org.apache.axiom.om.OMMetaFactory -> org.apache.axiom.soap.SOAPModelBuilder,
+                                org.apache.axiom.om.OMMetaFactorySPI -> org.apache.axiom.soap.SOAPFactory,
+                                org.apache.axiom.om.OMMetaFactorySPI -> org.apache.axiom.soap.SOAPModelBuilder,
                                 org.apache.axiom.om.OMXMLBuilderFactory -> org.apache.axiom.soap.SOAPFactory,
                                 org.apache.axiom.om.OMXMLBuilderFactory -> org.apache.axiom.soap.SOAPModelBuilder,
                                 <!-- This should eventually be deprecated/removed -->
                                 org.apache.axiom.om.util.ElementHelper -> org.apache.axiom.soap.SOAPFactory,
                                 org.apache.axiom.om.util.ElementHelper -> org.apache.axiom.soap.SOAPHeaderBlock,
                                 <!-- The public API shouldn't depend on classes in o.a.a.om.util
-->
-                                org.apache.axiom.om.OMMetaFactory -> org.apache.axiom.om.util.StAXParserConfiguration,
+                                org.apache.axiom.om.OMMetaFactorySPI -> org.apache.axiom.om.util.StAXParserConfiguration,
                                 org.apache.axiom.om.OMXMLBuilderFactory -> org.apache.axiom.om.util.StAXParserConfiguration,
                                 org.apache.axiom.om.OMOutputFormat -> org.apache.axiom.om.util.StAXWriterConfiguration,
                                 <!-- StAXUtils is in the wrong package (should be o.a.a.util.stax)
-->

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
Sun Jul  3 09:41:47 2016
@@ -19,18 +19,7 @@
 
 package org.apache.axiom.om;
 
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-
-import org.apache.axiom.mime.MimePartProvider;
-import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPModelBuilder;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-import org.xml.sax.ext.LexicalHandler;
 
 /**
  * Object model meta factory. This interface encapsulates a particular Axiom implementation
and
@@ -63,152 +52,4 @@ public interface OMMetaFactory {
      * @return the OM factory instance
      */
     SOAPFactory getSOAP12Factory();
-    
-    /**
-     * Create an object model builder for plain XML that pulls events from a StAX stream
reader.
-     * <p>
-     * The implementation must perform namespace repairing, i.e. it must add appropriate
namespace
-     * declarations if undeclared namespaces appear in the StAX stream.
-     * 
-     * @param parser
-     *            the stream reader to read the XML data from
-     * @return the builder
-     */
-    OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser);
-    
-    /**
-     * Create an object model builder for plain XML that reads a document from the provided
input
-     * source.
-     * 
-     * @param configuration
-     *            the parser configuration to use
-     * @param is
-     *            the source of the XML document
-     * @return the builder
-     */
-    OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration, InputSource
is);
-    
-    /**
-     * Create an object model builder for plain XML that gets its input from a {@link Source}.
-     * 
-     * @param source
-     *            the source of the XML document
-     * @return the builder
-     */
-    OMXMLParserWrapper createOMBuilder(Source source);
-    
-    /**
-     * Create an object model builder for plain XML that gets its input from a DOM tree.
-     * 
-     * @param node
-     *            the DOM node; must be a {@link Node#DOCUMENT_NODE} or {@link Node#ELEMENT_NODE}
-     * @param expandEntityReferences
-     *            Determines how {@link EntityReference} nodes are handled:
-     *            <ul>
-     *            <li>If the parameter is <code>false</code> then a single
{@link OMEntityReference}
-     *            will be created for each {@link EntityReference}. The child nodes of
-     *            {@link EntityReference} nodes are not taken into account.
-     *            <li>If the parameter is <code>true</code> then no {@link
OMEntityReference} nodes
-     *            are created and the children of {@link EntityReference} nodes are converted
and
-     *            inserted into the Axiom tree.
-     *            </ul>
-     * @return the builder
-     */
-    OMXMLParserWrapper createOMBuilder(Node node, boolean expandEntityReferences);
-    
-    /**
-     * Create an object model builder for plain XML that gets its input from a {@link SAXSource}.
-     * 
-     * @param source
-     *            the source of the XML document
-     * @param expandEntityReferences
-     *            Determines how entity references (i.e. {@link LexicalHandler#startEntity(String)}
-     *            and {@link LexicalHandler#endEntity(String)} events) are handled:
-     *            <ul>
-     *            <li>If the parameter is <code>false</code> then a single
{@link OMEntityReference}
-     *            will be created for each pair of {@link LexicalHandler#startEntity(String)}
and
-     *            {@link LexicalHandler#endEntity(String)} events. Other events reported
between
-     *            these two events are not taken into account.
-     *            <li>If the parameter is <code>true</code> then no {@link
OMEntityReference} nodes
-     *            are created and {@link LexicalHandler#startEntity(String)} and
-     *            {@link LexicalHandler#endEntity(String)} events are ignored. However, events
-     *            between {@link LexicalHandler#startEntity(String)} and
-     *            {@link LexicalHandler#endEntity(String)} are processed normally.
-     *            </ul>
-     * @return the builder
-     */
-    OMXMLParserWrapper createOMBuilder(SAXSource source, boolean expandEntityReferences);
-    
-    /**
-     * Create an XOP aware object model builder.
-     * 
-     * @param configuration
-     *            the parser configuration to use
-     * @param rootPart
-     *            the source of the root part of the XOP message
-     * @param mimePartProvider
-     *            the provider from which MIME parts referenced in the root part will be
retrieved
-     * @return the builder
-     */
-    OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration,
-            InputSource rootPart, MimePartProvider mimePartProvider);
-    
-    OMXMLParserWrapper createOMBuilder(Source rootPart, MimePartProvider mimePartProvider);
-    
-    /**
-     * Create an object model builder for SOAP that pulls events from a StAX stream reader.
The
-     * implementation will select the appropriate {@link SOAPFactory} based on the namespace
URI of
-     * the SOAP envelope.
-     * 
-     * @param parser
-     *            the stream reader to read the SOAP message from
-     * @return the builder
-     */
-    SOAPModelBuilder createStAXSOAPModelBuilder(XMLStreamReader parser);
-    
-    /**
-     * Create an object model builder for SOAP that reads a message from the provided input
source.
-     * The implementation will select the appropriate {@link SOAPFactory} based on the namespace
URI
-     * of the SOAP envelope.
-     * 
-     * @param configuration
-     *            the parser configuration to use; for security reasons, this should in general
be
-     *            {@link StAXParserConfiguration#SOAP}
-     * @param is
-     *            the source of the SOAP message
-     * @return the builder
-     */
-    SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration, InputSource
is);
-    
-    /**
-     * Create an object model builder for SOAP that reads a message from the provided {@link
Source}.
-     * The implementation will select the appropriate {@link SOAPFactory} based on the namespace
URI
-     * of the SOAP envelope.
-     * 
-     * @param source
-     *            the source of the SOAP message
-     * @return the builder
-     */
-    SOAPModelBuilder createSOAPModelBuilder(Source source);
-    
-    /**
-     * Create an MTOM aware object model builder.
-     * 
-     * @param configuration
-     *            the parser configuration to use; for security reasons, this should in general
be
-     *            {@link StAXParserConfiguration#SOAP}
-     * @param soapFactory
-     *            the {@link SOAPFactory} to use, or <code>null</code> if the
implementation should
-     *            select the appropriate {@link SOAPFactory} based on the namespace URI of
the SOAP
-     *            envelope.
-     * @param rootPart
-     *            the source of the root part of the MTOM message
-     * @param mimePartProvider
-     *            the provider from which MIME parts referenced in the root part will be
retrieved
-     * @return the builder
-     */
-    SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
-            SOAPFactory soapFactory, InputSource rootPart, MimePartProvider mimePartProvider);
-    
-    SOAPModelBuilder createSOAPModelBuilder(Source rootPart, MimePartProvider mimePartProvider);
 }

Copied: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
(from r1748300, webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java?p2=webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java&p1=webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java&r1=1748300&r2=1751136&rev=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactory.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
Sun Jul  3 09:41:47 2016
@@ -33,37 +33,9 @@ import org.xml.sax.InputSource;
 import org.xml.sax.ext.LexicalHandler;
 
 /**
- * Object model meta factory. This interface encapsulates a particular Axiom implementation
and
- * provides instances for plain XML, SOAP 1.1 and SOAP 1.2 object model factories for that
- * implementation. Currently the two OM implementations provided by Axiom are LLOM (linked
list) and
- * DOOM (DOM compatible).
- * <p>
- * The factories returned by {@link #getOMFactory()}, {@link #getSOAP11Factory()} and
- * {@link #getSOAP12Factory()} MUST be stateless (and thread safe). The implementation MUST
return
- * the same instance on every invocation, i.e. instantiate the factory for each OM type only
once.
+ * For internal use only.
  */
-public interface OMMetaFactory {
-    /**
-     * Get the OM factory instance for the XML infoset model.
-     *
-     * @return the OM factory instance
-     */
-    OMFactory getOMFactory();
-    
-    /**
-     * Get the OM factory instance for the SOAP 1.1 infoset model.
-     *
-     * @return the OM factory instance
-     */
-    SOAPFactory getSOAP11Factory();
-    
-    /**
-     * Get the OM factory instance for the SOAP 1.2 infoset model.
-     *
-     * @return the OM factory instance
-     */
-    SOAPFactory getSOAP12Factory();
-    
+public interface OMMetaFactorySPI extends OMMetaFactory {
     /**
      * Create an object model builder for plain XML that pulls events from a StAX stream
reader.
      * <p>

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
Sun Jul  3 09:41:47 2016
@@ -81,7 +81,7 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createStAXOMBuilder(XMLStreamReader parser) {
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
-        return metaFactory.createStAXOMBuilder(parser);
+        return ((OMMetaFactorySPI)metaFactory).createStAXOMBuilder(parser);
     }
     
     /**
@@ -98,7 +98,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader
parser) {
-        return omFactory.getMetaFactory().createStAXOMBuilder(parser);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createStAXOMBuilder(parser);
     }
     
     /**
@@ -159,7 +159,7 @@ public class OMXMLBuilderFactory {
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
         InputSource is = new InputSource(in);
         is.setEncoding(encoding);
-        return metaFactory.createOMBuilder(configuration, is);
+        return ((OMMetaFactorySPI)metaFactory).createOMBuilder(configuration, is);
     }
     
     /**
@@ -229,7 +229,7 @@ public class OMXMLBuilderFactory {
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration
configuration, InputStream in, String encoding) {
         InputSource is = new InputSource(in);
         is.setEncoding(encoding);
-        return omFactory.getMetaFactory().createOMBuilder(configuration, is);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(configuration,
is);
     }
     
     /**
@@ -257,7 +257,7 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration,
Reader in) {
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
-        return metaFactory.createOMBuilder(configuration, new InputSource(in));
+        return ((OMMetaFactorySPI)metaFactory).createOMBuilder(configuration, new InputSource(in));
     }
     
     /**
@@ -288,7 +288,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration
configuration, Reader in) {
-        return omFactory.getMetaFactory().createOMBuilder(configuration, new InputSource(in));
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(configuration,
new InputSource(in));
     }
     
     /**
@@ -304,7 +304,7 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createOMBuilder(Source source) {
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
-        return metaFactory.createOMBuilder(source);
+        return ((OMMetaFactorySPI)metaFactory).createOMBuilder(source);
     }
     
     /**
@@ -326,7 +326,7 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createOMBuilder(Node node, boolean expandEntityReferences)
{
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
-        return metaFactory.createOMBuilder(node, expandEntityReferences);
+        return ((OMMetaFactorySPI)metaFactory).createOMBuilder(node, expandEntityReferences);
     }
     
     /**
@@ -353,7 +353,7 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createOMBuilder(SAXSource source, boolean expandEntityReferences)
{
         OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory();
-        return metaFactory.createOMBuilder(source, expandEntityReferences);
+        return ((OMMetaFactorySPI)metaFactory).createOMBuilder(source, expandEntityReferences);
     }
     
     /**
@@ -371,7 +371,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Source source)
{
-        return omFactory.getMetaFactory().createOMBuilder(source);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(source);
     }
     
     /**
@@ -395,7 +395,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, Node node, boolean
expandEntityReferences) {
-        return omFactory.getMetaFactory().createOMBuilder(node, expandEntityReferences);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(node, expandEntityReferences);
     }
     
     /**
@@ -423,7 +423,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory, SAXSource source,
boolean expandEntityReferences) {
-        return omFactory.getMetaFactory().createOMBuilder(source, expandEntityReferences);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(source, expandEntityReferences);
     }
     
     /**
@@ -502,13 +502,13 @@ public class OMXMLBuilderFactory {
      */
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory,
             StAXParserConfiguration configuration, MIMEMessage message) {
-        return omFactory.getMetaFactory().createOMBuilder(configuration,
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(configuration,
                 getRootPartInputSource(message), message);
     }
     
     public static OMXMLParserWrapper createOMBuilder(OMFactory omFactory,
             Source rootPart, MimePartProvider mimePartProvider) {
-        return omFactory.getMetaFactory().createOMBuilder(rootPart, mimePartProvider);
+        return ((OMMetaFactorySPI)omFactory.getMetaFactory()).createOMBuilder(rootPart, mimePartProvider);
     }
     
     /**
@@ -526,7 +526,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static SOAPModelBuilder createStAXSOAPModelBuilder(OMMetaFactory metaFactory,
XMLStreamReader parser) {
-        return metaFactory.createStAXSOAPModelBuilder(parser);
+        return ((OMMetaFactorySPI)metaFactory).createStAXSOAPModelBuilder(parser);
     }
     
     /**
@@ -542,7 +542,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static SOAPModelBuilder createStAXSOAPModelBuilder(XMLStreamReader parser) {
-        return OMAbstractFactory.getMetaFactory().createStAXSOAPModelBuilder(parser);
+        return ((OMMetaFactorySPI)OMAbstractFactory.getMetaFactory()).createStAXSOAPModelBuilder(parser);
     }
     
     /**
@@ -580,7 +580,7 @@ public class OMXMLBuilderFactory {
     public static SOAPModelBuilder createSOAPModelBuilder(OMMetaFactory metaFactory, InputStream
in, String encoding) {
         InputSource is = new InputSource(in);
         is.setEncoding(encoding);
-        return metaFactory.createSOAPModelBuilder(StAXParserConfiguration.SOAP, is);
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
is);
     }
     
     /**
@@ -610,7 +610,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static SOAPModelBuilder createSOAPModelBuilder(OMMetaFactory metaFactory, Reader
in) {
-        return metaFactory.createSOAPModelBuilder(StAXParserConfiguration.SOAP, new InputSource(in));
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
new InputSource(in));
     }
     
     /**
@@ -638,7 +638,7 @@ public class OMXMLBuilderFactory {
      * @return the builder
      */
     public static SOAPModelBuilder createSOAPModelBuilder(OMMetaFactory metaFactory, Source
source) {
-        return metaFactory.createSOAPModelBuilder(source);
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(source);
     }
     
     /**
@@ -725,7 +725,7 @@ public class OMXMLBuilderFactory {
         } else {
             throw new OMException("Unable to determine SOAP version");
         }
-        return metaFactory.createSOAPModelBuilder(StAXParserConfiguration.SOAP, soapFactory,
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
soapFactory,
                 getRootPartInputSource(message), message);
     }
     
@@ -743,6 +743,6 @@ public class OMXMLBuilderFactory {
     
     public static SOAPModelBuilder createSOAPModelBuilder(OMMetaFactory metaFactory,
             Source rootPart, MimePartProvider mimePartProvider) {
-        return metaFactory.createSOAPModelBuilder(rootPart, mimePartProvider);
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(rootPart, mimePartProvider);
     }
 }

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/util/ElementHelper.java
Sun Jul  3 09:41:47 2016
@@ -27,6 +27,7 @@ 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.OMXMLBuilderFactory;
 import org.apache.axiom.om.ds.BlobOMDataSource;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -190,8 +191,8 @@ public class ElementHelper {
         if (omElement.getOMFactory().getMetaFactory() == omFactory.getMetaFactory()) {
             return omElement;
         } else {
-            OMElement documentElement = omFactory.getMetaFactory().createStAXOMBuilder(
-                    omElement.getXMLStreamReader()).getDocumentElement();
+            OMElement documentElement = OMXMLBuilderFactory.createStAXOMBuilder(
+                    omFactory, omElement.getXMLStreamReader()).getDocumentElement();
             documentElement.build();
             return documentElement;
         }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMDocumentBuilder.java
Sun Jul  3 09:41:47 2016
@@ -22,6 +22,7 @@ package org.apache.axiom.om.impl.dom.fac
 import org.apache.axiom.dom.DOMDocument;
 import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.dom.DOMMetaFactory;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.w3c.dom.DOMImplementation;
@@ -96,7 +97,7 @@ final class DOOMDocumentBuilder extends
     }
 
     public Document parse(InputSource inputSource) throws SAXException, IOException {
-        OMDocument document = factory.getMetaFactory().createOMBuilder(parserConfiguration,
+        OMDocument document = ((OMMetaFactorySPI)factory.getMetaFactory()).createOMBuilder(parserConfiguration,
                 inputSource).getDocument();
         document.close(true);
         return (Document)document;

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/dimension/BuilderFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/dimension/BuilderFactory.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/dimension/BuilderFactory.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/dimension/BuilderFactory.java
Sun Jul  3 09:41:47 2016
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.testing.multiton.Instances;
 import org.apache.axiom.testing.multiton.Multiton;
@@ -54,7 +55,7 @@ public abstract class BuilderFactory ext
         }
 
         public OMXMLParserWrapper getBuilder(OMMetaFactory metaFactory, InputSource inputSource)
throws Exception {
-            return metaFactory.createOMBuilder(AxiomTestCase.TEST_PARSER_CONFIGURATION,
+            return ((OMMetaFactorySPI)metaFactory).createOMBuilder(AxiomTestCase.TEST_PARSER_CONFIGURATION,
                     inputSource);
         }
     };

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCloseWithXMLStreamReader.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCloseWithXMLStreamReader.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCloseWithXMLStreamReader.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCloseWithXMLStreamReader.java
Sun Jul  3 09:41:47 2016
@@ -24,6 +24,7 @@ import java.lang.ref.WeakReference;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.ts.AxiomTestCase;
@@ -38,7 +39,7 @@ public class TestCloseWithXMLStreamReade
         InputStream in = XMLSample.SIMPLE.getInputStream();
         try {
             XMLStreamReader reader = StAXUtils.createXMLStreamReader(in);
-            OMXMLParserWrapper builder = metaFactory.createStAXOMBuilder(reader);
+            OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(),
reader);
             WeakReference<XMLStreamReader> readerWeakRef = new WeakReference<XMLStreamReader>(reader);
             reader = null;
             builder.getDocument().build();

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing.java
Sun Jul  3 09:41:47 2016
@@ -26,6 +26,7 @@ import javax.xml.stream.XMLStreamReader;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.ts.AxiomTestCase;
 
@@ -41,7 +42,8 @@ public class TestCreateStAXOMBuilderName
     protected void runTest() throws Throwable {
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader(
                 "<p:root xmlns:p='urn:ns1' xmlns:q='urn:ns2'><child q:attr='value'/></p:root>"));
-        OMElement element = metaFactory.createStAXOMBuilder(new NamespaceDeclarationFilter(reader)).getDocumentElement();
+        OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(),
+                new NamespaceDeclarationFilter(reader)).getDocumentElement();
         
         Iterator<OMNamespace> it = element.getAllDeclaredNamespaces();
         assertTrue(it.hasNext());

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing2.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing2.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing2.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestCreateStAXOMBuilderNamespaceRepairing2.java
Sun Jul  3 09:41:47 2016
@@ -26,6 +26,7 @@ import javax.xml.stream.XMLStreamReader;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.ts.AxiomTestCase;
 
@@ -43,7 +44,8 @@ public class TestCreateStAXOMBuilderName
     protected void runTest() throws Throwable {
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(new StringReader(
                 "<test xmlns='urn:test'><arg0 xmlns=''>dGVzdA==</arg0></test>"));
-        OMElement element = metaFactory.createStAXOMBuilder(new NamespaceDeclarationFilter(reader)).getDocumentElement();
+        OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(),
+                new NamespaceDeclarationFilter(reader)).getDocumentElement();
         
         Iterator<OMNamespace> it = element.getAllDeclaredNamespaces();
         assertTrue(it.hasNext());

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/container/TestSerialize.java
Sun Jul  3 09:41:47 2016
@@ -28,6 +28,7 @@ import java.net.URL;
 
 import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
@@ -50,7 +51,7 @@ public class TestSerialize extends Confo
     }
 
     protected void runTest() throws Throwable {
-        OMXMLParserWrapper builder = metaFactory.createOMBuilder(TEST_PARSER_CONFIGURATION,
+        OMXMLParserWrapper builder = ((OMMetaFactorySPI)metaFactory).createOMBuilder(TEST_PARSER_CONFIGURATION,
                 new InputSource(file.getUrl().toString()));
         try {
             OMContainer container = containerExtractor.getContainer(builder);

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/document/TestClone.java
Sun Jul  3 09:41:47 2016
@@ -24,6 +24,7 @@ import static org.apache.axiom.truth.xml
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.ts.ConformanceTestCase;
 import org.apache.axiom.ts.xml.XMLSample;
 import org.xml.sax.InputSource;
@@ -34,7 +35,7 @@ public class TestClone extends Conforman
     }
 
     protected void runTest() throws Throwable {
-        OMDocument original = metaFactory.createOMBuilder(TEST_PARSER_CONFIGURATION,
+        OMDocument original = ((OMMetaFactorySPI)metaFactory).createOMBuilder(TEST_PARSER_CONFIGURATION,
                 new InputSource(file.getUrl().toString())).getDocument();
         OMDocument clone = (OMDocument)original.clone(new OMCloneOptions());
         assertAbout(xml())

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderCDATAEventFromParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderCDATAEventFromParser.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderCDATAEventFromParser.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderCDATAEventFromParser.java
Sun Jul  3 09:41:47 2016
@@ -26,6 +26,7 @@ import javax.xml.stream.XMLStreamReader;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.ts.AxiomTestCase;
@@ -43,7 +44,7 @@ public class TestGetXMLStreamReaderCDATA
         // reported). This is not the default for Woodstox (see WSTX-140).
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(StAXParserConfiguration.NON_COALESCING,
is);
         
-        OMElement element = metaFactory.createStAXOMBuilder(reader).getDocumentElement();
+        OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(),
reader).getDocumentElement();
         
         // Build the element so we have a full StAX tree
         element.build();

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestCloneBinary.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestCloneBinary.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestCloneBinary.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestCloneBinary.java
Sun Jul  3 09:41:47 2016
@@ -26,6 +26,7 @@ import javax.activation.DataHandler;
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.OMText;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.testutils.activation.RandomDataSource;
@@ -45,7 +46,7 @@ public class TestCloneBinary extends Axi
         DataHandler dh = new DataHandler(new RandomDataSource(600613L, 4096));
         InputStream rootPart = new ByteArrayInputStream("<root><xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include'
href='cid:123456@example.org'/></root>".getBytes("utf-8"));
         DummyMimePartProvider mimePartProvider = new DummyMimePartProvider("123456@example.org",
dh);
-        OMElement root = metaFactory.createOMBuilder(StAXParserConfiguration.DEFAULT, new
InputSource(rootPart), mimePartProvider).getDocumentElement();
+        OMElement root = ((OMMetaFactorySPI)metaFactory).createOMBuilder(StAXParserConfiguration.DEFAULT,
new InputSource(rootPart), mimePartProvider).getDocumentElement();
         OMText text = (OMText)root.getFirstOMChild();
         OMCloneOptions options = new OMCloneOptions();
         options.setFetchDataHandlers(fetch);

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleAdapter.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleAdapter.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleAdapter.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleAdapter.java
Sun Jul  3 09:41:47 2016
@@ -19,6 +19,7 @@
 package org.apache.axiom.ts.soap;
 
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
@@ -41,7 +42,7 @@ public final class SOAPSampleAdapter {
     }
     
     public SOAPModelBuilder getBuilder(OMMetaFactory metaFactory) {
-        return metaFactory.createSOAPModelBuilder(StAXParserConfiguration.SOAP, new InputSource(sample.getInputStream()));
+        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
new InputSource(sample.getInputStream()));
     }
     
     public SOAPMessage getSOAPMessage(OMMetaFactory metaFactory) {

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestCase.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestCase.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestCase.java
Sun Jul  3 09:41:47 2016
@@ -23,14 +23,13 @@ import java.io.InputStream;
 import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.util.StAXParserConfiguration;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.soap.SOAPModelBuilder;
 import org.apache.axiom.ts.AxiomTestCase;
-import org.xml.sax.InputSource;
 
 public abstract class SOAPTestCase extends AxiomTestCase {
     protected static final String MESSAGE = "message.xml";
@@ -53,7 +52,7 @@ public abstract class SOAPTestCase exten
 
     protected SOAPModelBuilder getBuilderForTestMessage(String name) {
         InputStream in = AbstractTestCase.getTestResource("soap/" + spec.getName() + "/"
+ name);
-        return metaFactory.createSOAPModelBuilder(StAXParserConfiguration.SOAP, new InputSource(in));
+        return OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, in, null);
     }
     
     protected SOAPEnvelope getTestMessage(String name) {

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestSerializeWithXSITypeAttribute.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestSerializeWithXSITypeAttribute.java?rev=1751136&r1=1751135&r2=1751136&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestSerializeWithXSITypeAttribute.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestSerializeWithXSITypeAttribute.java
Sun Jul  3 09:41:47 2016
@@ -24,6 +24,7 @@ import javax.xml.namespace.QName;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMMetaFactorySPI;
 import org.apache.axiom.om.util.StAXParserConfiguration;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
@@ -51,7 +52,7 @@ public class TestSerializeWithXSITypeAtt
         // to for the namespace used in the value of the xsi:type attribute.
         XML xml = serializationStrategy.serialize(envelope.getBody());
         // No deserialize the result and test that the attribute value can be resolved.
-        OMElement element = metaFactory.createOMBuilder(StAXParserConfiguration.DEFAULT,
xml.getInputSource()).getDocumentElement().getFirstElement().getFirstElement();
+        OMElement element = ((OMMetaFactorySPI)metaFactory).createOMBuilder(StAXParserConfiguration.DEFAULT,
xml.getInputSource()).getDocumentElement().getFirstElement().getFirstElement();
         assertThat(element.resolveQName(element.getAttributeValue(new QName("http://www.w3.org/2001/XMLSchema-instance",
"type"))))
                 .isEqualTo(new QName("http://ws.apache.org/axis2/user", "myData"));
     }




Mime
View raw message