Author: veithen
Date: Sun Oct  2 11:08:26 2011
New Revision: 1178179

URL: http://svn.apache.org/viewvc?rev=1178179&view=rev
Log:
AXIOM-363: Deprecated the getNodeValue/setNodeValue methods in SOAPFaultNode 
(and added replacement methods) because they conflict with DOM methods and will 
be removed in Axiom 1.3.

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
    
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java?rev=1178179&r1=1178178&r2=1178179&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/CopyUtils.java
 Sun Oct  2 11:08:26 2011
@@ -423,7 +423,7 @@ public class CopyUtils {
                                           SOAPFaultNode sourceNode) {
         SOAPFaultNode targetNode = factory.createSOAPFaultNode(targetFault);
         copyTagData(sourceNode, targetNode);
-        targetNode.setNodeValue(sourceNode.getNodeValue());
+        targetNode.setFaultNodeValue(sourceNode.getFaultNodeValue());
     }
 
     /**

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java?rev=1178179&r1=1178178&r2=1178179&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultNode.java
 Sun Oct  2 11:08:26 2011
@@ -20,9 +20,22 @@
 package org.apache.axiom.soap;
 
 import org.apache.axiom.om.OMElement;
+import org.w3c.dom.Node;
 
 public interface SOAPFaultNode extends OMElement {
     /**
+     * @deprecated This method conflicts with {@link 
Node#setNodeValue(String)} and will be removed
+     *             in Axiom 1.3. Please use {@link #setFaultNodeValue(String)} 
instead.
+     */
+    void setNodeValue(String uri);
+
+    /**
+     * @deprecated This method conflicts with {@link Node#getNodeValue()} and 
will be removed in
+     *             Axiom 1.3. Please use {@link #getFaultNodeValue()} instead.
+     */
+    String getNodeValue();
+
+    /**
      * each SOAP node is identified by a URI. The value of the Node element 
information item is the
      * URI that identifies the SOAP node that generated the fault. SOAP nodes 
that do not act as the
      * ultimate SOAP receiver MUST include this element information item. An 
ultimate SOAP receiver
@@ -31,7 +44,7 @@ public interface SOAPFaultNode extends O
      *
      * @param uri
      */
-    void setNodeValue(String uri);
+    void setFaultNodeValue(String uri);
 
-    String getNodeValue();
+    String getFaultNodeValue();
 }

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java?rev=1178179&r1=1178178&r2=1178179&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultNodeTestBase.java
 Sun Oct  2 11:08:26 2011
@@ -47,28 +47,28 @@ public class SOAPFaultNodeTestBase exten
     }
 
     //SOAP 1.2 Fault Node Test (Programaticaly Created)
-    public void testSOAP12SetNodeValue() {
-        soap12FaultNode.setNodeValue("This is only a test");
+    public void testSOAP12SetFaultNodeValue() {
+        soap12FaultNode.setFaultNodeValue("This is only a test");
         assertTrue(
                 "SOAP 1.2 Fault Node Test : - After calling setNodeValue 
method, getNodeValue method returns incorrect value",
-                soap12FaultNode.getNodeValue().equals("This is only a test"));
+                soap12FaultNode.getFaultNodeValue().equals("This is only a 
test"));
     }
 
-    public void testSOAP12GetNodeValue() {
+    public void testSOAP12GetFaultNodeValue() {
         assertTrue(
                 "SOAP 1.2 Fault Node Test : - After creating SOAPFaultNode, it 
has a value",
-                soap12FaultNode.getNodeValue().equals(""));
-        soap12FaultNode.setNodeValue("This is only a test");
+                soap12FaultNode.getFaultNodeValue().equals(""));
+        soap12FaultNode.setFaultNodeValue("This is only a test");
         assertTrue(
                 "SOAP 1.2 Fault Node Test : - After calling setNodeValue 
method, getNodeValue method returns incorrect value",
-                soap12FaultNode.getNodeValue().equals("This is only a test"));
+                soap12FaultNode.getFaultNodeValue().equals("This is only a 
test"));
     }
 
     //SOAP 1.2 Fault Node Test (With Parser)
-    public void testSOAP12GetNodeValueWithParser() {
+    public void testSOAP12GetFaultNodeValueWithParser() {
         assertTrue(
                 "SOAP 1.2 Fault Node Test With Parser : - getNodeValue method 
returns incorrect value",
-                soap12FaultNodeWithParser.getNodeValue().trim().equals(
+                soap12FaultNodeWithParser.getFaultNodeValue().trim().equals(
                         
"http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";));
     }
 }

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java?rev=1178179&r1=1178178&r2=1178179&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
 Sun Oct  2 11:08:26 2011
@@ -44,14 +44,22 @@ public abstract class SOAPFaultNodeImpl 
               factory);
     }
 
-    public void setNodeValue(String uri) {
+    public void setFaultNodeValue(String uri) {
         this.setText(uri);
     }
 
-    public String getNodeValue() {
+    public String getFaultNodeValue() {
         return this.getText();
     }
 
+    public void setNodeValue(String uri) {
+        setFaultNodeValue(uri);
+    }
+
+    public String getNodeValue() {
+        return getFaultNodeValue();
+    }
+
     public void internalSerialize(
             XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java?rev=1178179&r1=1178178&r2=1178179&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java
 Sun Oct  2 11:08:26 2011
@@ -42,11 +42,19 @@ public abstract class SOAPFaultNodeImpl 
         super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder, 
factory);
     }
 
-    public void setNodeValue(String uri) {
+    public void setFaultNodeValue(String uri) {
         this.setText(uri);
     }
 
-    public String getNodeValue() {
+    public String getFaultNodeValue() {
         return this.getText();
     }
+
+    public void setNodeValue(String uri) {
+        setFaultNodeValue(uri);
+    }
+
+    public String getNodeValue() {
+        return getFaultNodeValue();
+    }
 }


Reply via email to