ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1042182 - in /webservices/commons/trunk/modules/neethi: pom.xml src/main/java/org/apache/neethi/PolicyEngine.java
Date Sat, 04 Dec 2010 13:59:25 GMT
Author: veithen
Date: Sat Dec  4 13:59:25 2010
New Revision: 1042182

URL: http://svn.apache.org/viewvc?rev=1042182&view=rev
Log:
Make sure that Neethi only uses Axiom classes that are part of the public API, not classes
that belong to a particular implementation.

Modified:
    webservices/commons/trunk/modules/neethi/pom.xml
    webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java

Modified: webservices/commons/trunk/modules/neethi/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/pom.xml?rev=1042182&r1=1042181&r2=1042182&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/pom.xml (original)
+++ webservices/commons/trunk/modules/neethi/pom.xml Sat Dec  4 13:59:25 2010
@@ -212,6 +212,7 @@
 			<groupId>org.apache.ws.commons.axiom</groupId>
 			<artifactId>axiom-impl</artifactId>
 			<version>${axiom.version}</version>
+			<scope>runtime</scope>
 		</dependency>
 		<dependency>
 			<groupId>wsdl4j</groupId>
@@ -274,7 +275,7 @@
 		</site>
 	</distributionManagement>
 	<properties>
-        <axiom.version>1.2.8</axiom.version>
+        <axiom.version>1.2.11-SNAPSHOT</axiom.version>
         <neethi.osgi.version>${pom.version}</neethi.osgi.version>
         <bundle.plugin.version>1.4.0</bundle.plugin.version>
         <failIfNoTests>false</failIfNoTests>

Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java?rev=1042182&r1=1042181&r2=1042182&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java
(original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyEngine.java
Sat Dec  4 13:59:25 2010
@@ -23,11 +23,10 @@ import org.apache.axiom.om.OMAbstractFac
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.neethi.PolicyEngine;
 import org.apache.neethi.builders.AssertionBuilder;
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import java.io.InputStream;
 import java.util.Iterator;
 import org.apache.commons.logging.Log;
@@ -80,10 +79,8 @@ public class PolicyEngine {
      */
     public static Policy getPolicy(InputStream inputStream) {
         try {
-            OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(
-                    OMAbstractFactory.getOMFactory(),
-                    XMLInputFactory.newInstance().createXMLStreamReader(
-                            inputStream)).getDocumentElement();
+            OMElement element = OMXMLBuilderFactory.createOMBuilder(
+                    inputStream).getDocumentElement();
             return getPolicy(element);
 
         } catch (Exception ex) {
@@ -104,10 +101,8 @@ public class PolicyEngine {
     public static PolicyReference getPolicyReferene(InputStream inputStream) {
 
         try {
-            OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(
-                    OMAbstractFactory.getOMFactory(),
-                    XMLInputFactory.newInstance().createXMLStreamReader(
-                            inputStream)).getDocumentElement();
+            OMElement element = OMXMLBuilderFactory.createOMBuilder(
+                    inputStream).getDocumentElement();
             return getPolicyReference(element);
 
         } catch (Exception ex) {



Mime
View raw message