You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2011/07/11 22:33:43 UTC
svn commit: r1145332 - in /axis/axis2/java/core/branches/1_6: ./
modules/kernel/src/org/apache/axis2/util/
modules/mtompolicy/src/org/apache/axis2/policy/builders/
modules/mtompolicy/src/org/apache/axis2/policy/model/ modules/parent/
Author: veithen
Date: Mon Jul 11 20:33:43 2011
New Revision: 1145332
URL: http://svn.apache.org/viewvc?rev=1145332&view=rev
Log:
Merged r1072296, r1089989, r1090429 and r1090457 to the 1.6 branch to upgrade to Neethi 3.0.1.
Modified:
axis/axis2/java/core/branches/1_6/ (props changed)
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java
axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM10AssertionBuilder.java
axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM11AssertionBuilder.java
axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOMAssertion.java
axis/axis2/java/core/branches/1_6/modules/parent/pom.xml
Propchange: axis/axis2/java/core/branches/1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 11 20:33:43 2011
@@ -1 +1 @@
-/axis/axis2/java/core/trunk:1070439,1072077,1072271,1072499,1072510,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1091178,1091191,1094117,1099385,1099389,1100628,1101037,1103013,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1137153,1137159,1138144,1138203,1139448,1139484
+/axis/axis2/java/core/trunk:1070439,1072077,1072271,1072296,1072499,1072510,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1099385,1099389,1100628,1101037,1103013,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1137153,1137159,1138144,1138203,1139448,1139484
Modified: axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java?rev=1145332&r1=1145331&r2=1145332&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/util/PolicyUtil.java Mon Jul 11 20:33:43 2011
@@ -21,16 +21,13 @@ package org.apache.axis2.util;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
import java.util.Iterator;
import java.util.List;
-import javax.xml.namespace.QName;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Transformer;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
@@ -47,8 +44,6 @@ import org.apache.neethi.PolicyComponent
import org.apache.neethi.PolicyEngine;
import org.apache.neethi.PolicyReference;
-import com.ibm.wsdl.util.xml.DOM2Writer;
-
public class PolicyUtil {
public static String getSafeString(String unsafeString) {
@@ -140,21 +135,20 @@ public class PolicyUtil {
public static PolicyComponent getPolicyComponentFromOMElement(
OMElement policyComponent) throws IllegalArgumentException {
- if (Constants.Q_ELEM_POLICY.equals(policyComponent.getQName())) {
+ if (Constants.isPolicyElement(policyComponent.getQName())) {
return PolicyEngine.getPolicy(policyComponent);
- } else if (policyComponent.getQName().equals(
- new QName(Constants.URI_POLICY_NS, Constants.ELEM_POLICY_REF))) {
+ } else if (Constants.isPolicyRef(policyComponent.getQName())) {
return PolicyEngine.getPolicyReference(policyComponent);
} else {
throw new IllegalArgumentException(
- "Agrument is neither a <wsp:Policy> nor a <wsp:PolicyReference> element");
+ "Argument is neither a <wsp:Policy> nor a <wsp:PolicyReference> element");
}
}
public static Policy getPolicyFromOMElement(OMElement policyElement) {
- if (Constants.Q_ELEM_POLICY.equals(policyElement.getQName())) {
+ if (Constants.isPolicyElement(policyElement.getQName())) {
return PolicyEngine.getPolicy(policyElement);
} else {
throw new IllegalArgumentException(
@@ -164,10 +158,7 @@ public class PolicyUtil {
public static PolicyReference getPolicyReferenceFromOMElement(
OMElement policyRefElement) {
- if (Constants.URI_POLICY_NS.equals(policyRefElement.getNamespace()
- .getNamespaceURI())
- && Constants.ELEM_POLICY_REF.equals(policyRefElement
- .getLocalName())) {
+ if (Constants.isPolicyRef(policyRefElement.getQName())) {
return PolicyEngine.getPolicyReference(policyRefElement);
} else {
throw new IllegalArgumentException(
@@ -176,30 +167,14 @@ public class PolicyUtil {
}
public static PolicyComponent getPolicyComponent(org.w3c.dom.Element element) {
- if (Constants.URI_POLICY_NS.equals(element.getNamespaceURI())) {
-
- if (Constants.ELEM_POLICY.equals(element.getLocalName())) {
- return PolicyEngine.getPolicy(nodeToStream(element));
+ if (Constants.isPolicyElement(element.getNamespaceURI(), (element.getLocalName()))) {
+ return PolicyEngine.getPolicy(element);
- } else if (Constants.ELEM_POLICY_REF.equals(element.getLocalName())) {
- return PolicyEngine.getPolicyReferene(nodeToStream(element));
- }
+ } else if (Constants.isPolicyRef(element.getNamespaceURI(), element.getLocalName())) {
+ return PolicyEngine.getPolicyReference(element);
}
throw new IllegalArgumentException(
- "Agrument is neither a <wsp:Policy> nor a <wsp:PolicyReference> element");
- }
-
- private static InputStream nodeToStream(org.w3c.dom.Element element) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- Transformer tf;
- try {
- // tf = TransformerFactory.newInstance().newTransformer();
- // tf.transform(new DOMSource(element), new StreamResult(baos));
- String nodeString = DOM2Writer.nodeToString(element);
- return new ByteArrayInputStream(nodeString.getBytes());
- } catch (Exception e) {
- throw new RuntimeException("Unable to process policy");
- }
+ "Argument is neither a <wsp:Policy> nor a <wsp:PolicyReference> element");
}
public static String policyComponentToString(PolicyComponent policyComponent)
Modified: axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM10AssertionBuilder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM10AssertionBuilder.java?rev=1145332&r1=1145331&r2=1145332&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM10AssertionBuilder.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM10AssertionBuilder.java Mon Jul 11 20:33:43 2011
@@ -43,7 +43,7 @@ import javax.xml.namespace.QName;
* The builder will be picked by the
* "org.apache.neethi.AssertionBuilderFactory".
*/
-public class MTOM10AssertionBuilder implements AssertionBuilder {
+public class MTOM10AssertionBuilder implements AssertionBuilder<OMElement> {
private static Log log = LogFactory.getLog(MTOM10AssertionBuilder.class);
Modified: axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM11AssertionBuilder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM11AssertionBuilder.java?rev=1145332&r1=1145331&r2=1145332&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM11AssertionBuilder.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/builders/MTOM11AssertionBuilder.java Mon Jul 11 20:33:43 2011
@@ -39,7 +39,7 @@ import org.apache.neethi.builders.Assert
* "org.apache.neethi.AssertionBuilderFactory".
*/
-public class MTOM11AssertionBuilder implements AssertionBuilder{
+public class MTOM11AssertionBuilder implements AssertionBuilder<OMElement> {
private static Log log = LogFactory.getLog(MTOM10AssertionBuilder.class);
Modified: axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOMAssertion.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOMAssertion.java?rev=1145332&r1=1145331&r2=1145332&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOMAssertion.java (original)
+++ axis/axis2/java/core/branches/1_6/modules/mtompolicy/src/org/apache/axis2/policy/model/MTOMAssertion.java Mon Jul 11 20:33:43 2011
@@ -52,5 +52,8 @@ public abstract class MTOMAssertion impl
this.optional = isOptional;
}
+ public boolean isIgnorable() {
+ return false;
+ }
}
\ No newline at end of file
Modified: axis/axis2/java/core/branches/1_6/modules/parent/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/parent/pom.xml?rev=1145332&r1=1145331&r2=1145332&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/branches/1_6/modules/parent/pom.xml Mon Jul 11 20:33:43 2011
@@ -66,7 +66,7 @@
<url>http://issues.apache.org/jira/browse/AXIS2</url>
</issueManagement>
<properties>
- <neethi.version>2.0.5</neethi.version>
+ <neethi.version>3.0.1-SNAPSHOT</neethi.version>
<woden.version>1.0M9</woden.version>
<axiom.version>1.2.12</axiom.version>
<xmlschema.version>1.4.7</xmlschema.version>
@@ -615,6 +615,12 @@
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
<version>${neethi.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>