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 2011/07/15 22:19:21 UTC

svn commit: r1147304 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java

Author: veithen
Date: Fri Jul 15 20:19:21 2011
New Revision: 1147304

URL: http://svn.apache.org/viewvc?rev=1147304&view=rev
Log:
AXIOM-353: Added a method to OMXMLBuilderFactory that allows getting a SOAPModelBuilder from a character stream.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java?rev=1147304&r1=1147303&r2=1147304&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java Fri Jul 15 20:19:21 2011
@@ -276,4 +276,17 @@ public class OMXMLBuilderFactory {
         is.setEncoding(encoding);
         return OMAbstractFactory.getMetaFactory().createSOAPModelBuilder(StAXParserConfiguration.SOAP, is);
     }
+    
+    /**
+     * Create an object model builder for SOAP that reads a message from the provided character stream. The method will select the appropriate {@link SOAPFactory}
+     * based on the namespace URI of the SOAP envelope. It will configure the underlying parser as
+     * specified by {@link StAXParserConfiguration#SOAP}.
+     * 
+     * @param in
+     *            the character stream containing the SOAP message
+     * @return the builder
+     */
+    public static SOAPModelBuilder createSOAPModelBuilder(Reader in) {
+        return OMAbstractFactory.getMetaFactory().createSOAPModelBuilder(StAXParserConfiguration.SOAP, new InputSource(in));
+    }
 }