svn commit: r1180718 - in /axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart: handler/PostDispatchVerificationHandler.java util/Axis2Util.java

2011-10-09 Thread veithen
Author: veithen
Date: Sun Oct  9 21:24:30 2011
New Revision: 1180718

URL: http://svn.apache.org/viewvc?rev=1180718&view=rev
Log:
Eliminated a couple of direct references to DOOM.

Modified:

axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java

axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java?rev=1180718&r1=1180717&r2=1180718&view=diff
==
--- 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java
 Sun Oct  9 21:24:30 2011
@@ -20,7 +20,6 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMException;
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
-import org.apache.axiom.soap.impl.dom.soap11.SOAP11HeaderBlockImpl;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.HandlerDescription;

Modified: 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java?rev=1180718&r1=1180717&r2=1180718&view=diff
==
--- 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
 (original)
+++ 
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
 Sun Oct  9 21:24:30 2011
@@ -16,14 +16,15 @@
 
 package org.apache.rampart.util;
 
+import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.impl.dom.DOOMAbstractFactory;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -32,8 +33,6 @@ import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.soap.SOAPModelBuilder;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import org.apache.axiom.soap.impl.dom.SOAPHeaderBlockImpl;
-import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 import org.apache.rampart.handler.WSSHandlerConstants;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.xml.security.utils.XMLUtils;
@@ -129,14 +128,15 @@ public class Axis2Util {
 
 // Check the namespace and find SOAP version and factory
 String nsURI = null;
+OMMetaFactory metaFactory = 
OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
 SOAPFactory factory;
 if (env.getNamespace().getNamespaceURI().equals(
 SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
 nsURI = SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-factory = DOOMAbstractFactory.getSOAP11Factory();
+factory = metaFactory.getSOAP11Factory();
 } else {
 nsURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
-factory = DOOMAbstractFactory.getSOAP12Factory();
+factory = metaFactory.getSOAP12Factory();
 }
 
 StAXSOAPModelBuilder stAXSOAPModelBuilder = new 
StAXSOAPModelBuilder(
@@ -188,10 +188,11 @@ public class Axis2Util {
Element documentElement = doc.getDocumentElement();
if (documentElement instanceof SOAPEnvelope) {
SOAPEnvelope env = (SOAPEnvelope)documentElement;
-   // If the DOM tree already implements the Axiom API and is not 
DOOM, then just return
-   // the SOAPEnvelope directly, i.e. we assume that any Axiom+DOM 
implementation other
-   // than DOOM implements enough of the Axiom API to support the 
Axis2 runtime.
-   if (!(env.getOMFactory() instanceof DOMSOAPFactory)) {
+   // If the DOM tree already impleme

svn commit: r1180793 - /axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java

2011-10-09 Thread azeez
Author: azeez
Date: Mon Oct 10 06:47:23 2011
New Revision: 1180793

URL: http://svn.apache.org/viewvc?rev=1180793&view=rev
Log:
Applying patch provided by Hiranya for AXIS2-5165

Modified:

axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java

Modified: 
axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java?rev=1180793&r1=1180792&r2=1180793&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusteringAgent.java
 Mon Oct 10 06:47:23 2011
@@ -264,11 +264,14 @@ public class TribesClusteringAgent imple
 OMElement propEle = (OMElement) iter.next();
 OMAttribute nameAttrib = propEle.getAttribute(new 
QName("name"));
 if(nameAttrib != null){
+String attribName = nameAttrib.getAttributeValue();
+attribName = replaceProperty(attribName, memberInfo);
+
 OMAttribute valueAttrib = propEle.getAttribute(new 
QName("value"));
 if  (valueAttrib != null) {
 String attribVal = valueAttrib.getAttributeValue();
 attribVal = replaceProperty(attribVal, memberInfo);
-memberInfo.setProperty(nameAttrib.getAttributeValue(), 
attribVal);
+memberInfo.setProperty(attribName, attribVal);
 }
 }
 }
@@ -300,6 +303,9 @@ public class TribesClusteringAgent imple
 String sysProp = text.substring(indexOfStartingChars + 2,
 indexOfClosingBrace);
 String propValue = props.getProperty(sysProp);
+if (propValue == null) {
+propValue = System.getProperty(sysProp);
+}
 if (propValue != null) {
 text = text.substring(0, indexOfStartingChars) + propValue +
text.substring(indexOfClosingBrace + 1);