ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1737554 - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/ axiom-api/src/main/java/org/apache/axiom/soap/ implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/ implementation...
Date Sun, 03 Apr 2016 09:02:39 GMT
Author: veithen
Date: Sun Apr  3 09:02:39 2016
New Revision: 1737554

URL: http://svn.apache.org/viewvc?rev=1737554&view=rev
Log:
Unify the SOAPFaultReason implementations.

Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP11FaultReasonSupport.aj
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP12FaultReasonSupport.aj
    webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP11FaultReasonSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP11FaultReasonSupport.aj?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP11FaultReasonSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP11FaultReasonSupport.aj
Sun Apr  3 09:02:39 2016
@@ -18,8 +18,12 @@
  */
 package org.apache.axiom.soap.impl.mixin;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.impl.intf.AxiomSOAP11FaultReason;
 
 public aspect AxiomSOAP11FaultReasonSupport {
@@ -30,4 +34,20 @@ public aspect AxiomSOAP11FaultReasonSupp
     public final boolean AxiomSOAP11FaultReason.isChildElementAllowed(OMElement child) {
         return false;
     }
+
+    public final void AxiomSOAP11FaultReason.addSOAPText(SOAPFaultText soapFaultText) {
+        throw new UnsupportedOperationException("addSOAPText() not allowed for SOAP 1.1!");
+    }
+
+    public final SOAPFaultText AxiomSOAP11FaultReason.getFirstSOAPText() {
+        throw new UnsupportedOperationException("getFirstSOAPText() not allowed for SOAP
1.1!");
+    }
+
+    public final List<SOAPFaultText> AxiomSOAP11FaultReason.getAllSoapTexts() {
+        return Collections.emptyList();
+    }
+
+    public final SOAPFaultText AxiomSOAP11FaultReason.getSOAPFaultText(String language) {
+        return null;
+    }
 }

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP12FaultReasonSupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP12FaultReasonSupport.aj?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP12FaultReasonSupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/mixin/AxiomSOAP12FaultReasonSupport.aj
Sun Apr  3 09:02:39 2016
@@ -18,6 +18,10 @@
  */
 package org.apache.axiom.soap.impl.mixin;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 import org.apache.axiom.core.CoreNode;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPFaultText;
@@ -35,4 +39,26 @@ public aspect AxiomSOAP12FaultReasonSupp
     public final void AxiomSOAP12FaultReason.addSOAPText(SOAPFaultText soapFaultText) {
         addChild(soapFaultText);
     }
+
+    public final SOAPFaultText AxiomSOAP12FaultReason.getFirstSOAPText() {
+        return (SOAPFaultText)getFirstElement();
+    }
+
+    public final List<SOAPFaultText> AxiomSOAP12FaultReason.getAllSoapTexts() {
+        List<SOAPFaultText> faultTexts = new ArrayList<SOAPFaultText>();
+        for (Iterator<OMElement> it = getChildElements(); it.hasNext(); ) {
+            faultTexts.add((SOAPFaultText)it.next());
+        }
+        return faultTexts;
+    }
+
+    public final SOAPFaultText AxiomSOAP12FaultReason.getSOAPFaultText(String language) {
+        for (Iterator<OMElement> it = getChildElements(); it.hasNext(); ) {
+            SOAPFaultText text = (SOAPFaultText)it.next();
+            if (language == null || language.equals(text.getLang())) {
+                return text;
+            }
+        }
+        return null;
+    }
 }

Modified: webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java
(original)
+++ webservices/axiom/trunk/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFaultReason.java
Sun Apr  3 09:02:39 2016
@@ -28,7 +28,7 @@ public interface SOAPFaultReason extends
 
     SOAPFaultText getFirstSOAPText();
 
-    List getAllSoapTexts();
+    List<SOAPFaultText> getAllSoapTexts();
 
     SOAPFaultText getSOAPFaultText(String language);
 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,31 +19,8 @@
 
 package org.apache.axiom.soap.impl.dom;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.axiom.om.OMNode;
-import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.impl.intf.AxiomSOAPFaultReason;
 
-public abstract class SOAPFaultReasonImpl extends SOAPElement implements
-        AxiomSOAPFaultReason {
-    public List getAllSoapTexts() {
-        //TODO Ruchith check
-        List faultTexts = new ArrayList();
-        Iterator childrenIter = this.getChildren();
-        while (childrenIter.hasNext()) {
-            OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText))
{
-                faultTexts.add(((SOAPFaultText) node));
-            }
-        }
-        return faultTexts;
-    }
+public abstract class SOAPFaultReasonImpl extends SOAPElement implements AxiomSOAPFaultReason
{
 
-    public SOAPFaultText getSOAPFaultText(String language) {
-        //TODO Ruchith
-        throw new UnsupportedOperationException();
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,18 +19,9 @@
 
 package org.apache.axiom.soap.impl.dom.soap11;
 
-import org.apache.axiom.soap.SOAPFaultText;
-import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.dom.SOAPFaultReasonImpl;
 import org.apache.axiom.soap.impl.intf.AxiomSOAP11FaultReason;
 
 public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl implements AxiomSOAP11FaultReason
{
-    public void addSOAPText(SOAPFaultText soapFaultText)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException("addSOAPText() not allowed for SOAP 1.1!");
-    }
 
-    public SOAPFaultText getFirstSOAPText() {
-        throw new UnsupportedOperationException("getFirstSOAPText() not supported for SOAP
1.1!");
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,13 +19,9 @@
 
 package org.apache.axiom.soap.impl.dom.soap12;
 
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.impl.dom.SOAPFaultReasonImpl;
 import org.apache.axiom.soap.impl.intf.AxiomSOAP12FaultReason;
 
 public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl implements AxiomSOAP12FaultReason
{
-    public SOAPFaultText getFirstSOAPText() {
-        return (SOAPFaultText)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_TEXT);
-    }
+
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,37 +19,8 @@
 
 package org.apache.axiom.soap.impl.llom;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.axiom.om.OMNode;
-import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.impl.intf.AxiomSOAPFaultReason;
 
 public abstract class SOAPFaultReasonImpl extends SOAPElement implements AxiomSOAPFaultReason
{
-    public List getAllSoapTexts() {
-        List faultTexts = new ArrayList(1);
-        Iterator childrenIter = this.getChildren();
-        while (childrenIter.hasNext()) {
-            OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText))
{
-                faultTexts.add(((SOAPFaultText) node));
-            }
-        }
-        return faultTexts;
-    }
-
-    public SOAPFaultText getSOAPFaultText(String language) {
-        Iterator childrenIter = this.getChildren();
-        while (childrenIter.hasNext()) {
-            OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText)
&&
-                    (language == null || language.equals(((SOAPFaultText) node).getLang())))
{
-                return (SOAPFaultText) node;
-            }
-        }
 
-        return null;
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,18 +19,9 @@
 
 package org.apache.axiom.soap.impl.llom.soap11;
 
-import org.apache.axiom.soap.SOAPFaultText;
-import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.intf.AxiomSOAP11FaultReason;
 import org.apache.axiom.soap.impl.llom.SOAPFaultReasonImpl;
 
 public class SOAP11FaultReasonImpl extends SOAPFaultReasonImpl implements AxiomSOAP11FaultReason
{
-    public void addSOAPText(SOAPFaultText soapFaultText)
-            throws SOAPProcessingException {
-        throw new UnsupportedOperationException("addSOAPText() not allowed for SOAP 1.1!");
-    }
 
-    public SOAPFaultText getFirstSOAPText() {
-        throw new UnsupportedOperationException("getFirstSOAPText() not allowed for SOAP
1.1!");
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java?rev=1737554&r1=1737553&r2=1737554&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
Sun Apr  3 09:02:39 2016
@@ -19,17 +19,10 @@
 
 package org.apache.axiom.soap.impl.llom.soap12;
 
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.impl.intf.AxiomSOAP12FaultReason;
 import org.apache.axiom.soap.impl.llom.SOAPFaultReasonImpl;
 
 public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl implements AxiomSOAP12FaultReason
{
-    public SOAPFaultText getFirstSOAPText() {
-        return (SOAPFaultText)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_TEXT);
-    }
-
-
     /**
      * getText() is overridden here in order to provide a uniform way for SOAP 1.1
      * and SOAP 1.2 to get the "default" reason string.



Mime
View raw message