ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1752291 - 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/
Date Tue, 12 Jul 2016 13:36:24 GMT
Author: veithen
Date: Tue Jul 12 13:36:24 2016
New Revision: 1752291

URL: http://svn.apache.org/viewvc?rev=1752291&view=rev
Log:
Simplify the OMMetaFactorySPI interface.

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/OMMetaFactorySPI.java
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.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=1752291&r1=1752290&r2=1752291&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
Tue Jul 12 13:36:24 2016
@@ -31,10 +31,7 @@ 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;
-import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPModelBuilder;
-import org.apache.axiom.soap.SOAPProcessingException;
 import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 
@@ -102,13 +99,8 @@ public abstract class AbstractOMMetaFact
 
     @Override
     public SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
-            SOAPFactory soapFactory, InputSource rootPart, MimePartProvider mimePartProvider)
{
-        SOAPModelBuilder builder = SOAP.createBuilder(nodeFactory, BuilderSpec.from(configuration,
rootPart, mimePartProvider));
-        if (builder.getSOAPMessage().getOMFactory() != soapFactory) {
-            throw new SOAPProcessingException("Invalid SOAP namespace URI. " +
-                    "Expected " + soapFactory.getSoapVersionURI(), SOAP12Constants.FAULT_CODE_SENDER);
-        }
-        return builder;
+            InputSource rootPart, MimePartProvider mimePartProvider) {
+        return SOAP.createBuilder(nodeFactory, BuilderSpec.from(configuration, rootPart,
mimePartProvider));
     }
 
     @Override

Modified: webservices/axiom/trunk/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/pom.xml?rev=1752291&r1=1752290&r2=1752291&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/pom.xml (original)
+++ webservices/axiom/trunk/axiom-api/pom.xml Tue Jul 12 13:36:24 2016
@@ -306,10 +306,11 @@
                                 <!-- 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.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.SOAPMessage,
                                 org.apache.axiom.om.OMXMLBuilderFactory -> org.apache.axiom.soap.SOAPModelBuilder,
+                                org.apache.axiom.om.OMXMLBuilderFactory -> org.apache.axiom.soap.SOAPProcessingException,
                                 <!-- 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,

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java?rev=1752291&r1=1752290&r2=1752291&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/om/OMMetaFactorySPI.java
Tue Jul 12 13:36:24 2016
@@ -169,10 +169,6 @@ public interface OMMetaFactorySPI extend
      * @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
@@ -180,7 +176,7 @@ public interface OMMetaFactorySPI extend
      * @return the builder
      */
     SOAPModelBuilder createSOAPModelBuilder(StAXParserConfiguration configuration,
-            SOAPFactory soapFactory, InputSource rootPart, MimePartProvider mimePartProvider);
+            InputSource rootPart, MimePartProvider mimePartProvider);
     
     SOAPModelBuilder createSOAPModelBuilder(Source rootPart, MimePartProvider mimePartProvider);
 }

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=1752291&r1=1752290&r2=1752291&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
Tue Jul 12 13:36:24 2016
@@ -34,8 +34,10 @@ import org.apache.axiom.mime.MIMEMessage
 import org.apache.axiom.mime.MimePartProvider;
 import org.apache.axiom.mime.Part;
 import org.apache.axiom.om.util.StAXParserConfiguration;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPModelBuilder;
+import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.util.stax.XMLStreamReaderUtils;
 import org.w3c.dom.EntityReference;
 import org.w3c.dom.Node;
@@ -725,8 +727,13 @@ public class OMXMLBuilderFactory {
         } else {
             throw new OMException("Unable to determine SOAP version");
         }
-        return ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
soapFactory,
+        SOAPModelBuilder builder = ((OMMetaFactorySPI)metaFactory).createSOAPModelBuilder(StAXParserConfiguration.SOAP,
                 getRootPartInputSource(message), message);
+        if (builder.getSOAPMessage().getOMFactory() != soapFactory) {
+            throw new SOAPProcessingException("Invalid SOAP namespace URI. " +
+                    "Expected " + soapFactory.getSoapVersionURI(), SOAP12Constants.FAULT_CODE_SENDER);
+        }
+        return builder;
     }
     
     private static InputSource getRootPartInputSource(MIMEMessage message) {



Mime
View raw message