ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1598905 - in /webservices/axiom/trunk/modules: axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/ axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/ axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/ axiom-impl/src/...
Date Sat, 31 May 2014 19:12:15 GMT
Author: veithen
Date: Sat May 31 19:12:14 2014
New Revision: 1598905

URL: http://svn.apache.org/r1598905
Log:
Simplify the SOAP class hierarchy.

Removed:
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultNodeImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultSubCodeImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultTextImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultValueImpl.java
Modified:
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.java
    webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
    webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.java

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
Sat May 31 19:12:14 2014
@@ -63,8 +63,8 @@ public abstract class SOAPFaultReasonImp
         Iterator childrenIter = this.getChildren();
         while (childrenIter.hasNext()) {
             OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl))
{
-                faultTexts.add(((SOAPFaultTextImpl) node));
+            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText))
{
+                faultTexts.add(((SOAPFaultText) node));
             }
         }
         return faultTexts;

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultNodeImpl.java
Sat May 31 19:12:14 2014
@@ -25,20 +25,22 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultNode;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.dom.SOAPFaultNodeImpl;
+import org.apache.axiom.soap.impl.dom.SOAPElement;
 
-public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl {
+public class SOAP12FaultNodeImpl extends SOAPElement implements SOAPFaultNode {
     public SOAP12FaultNodeImpl(SOAPFault parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultNodeImpl(ParentNode parentNode, OMNamespace ns, OMXMLParserWrapper
builder,
             OMFactory factory, boolean generateNSDecl) {
-        super(parentNode, ns, builder, factory, generateNSDecl);
+        super(parentNode, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, ns, builder, factory,
generateNSDecl);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -49,6 +51,22 @@ public class SOAP12FaultNodeImpl extends
         }
     }
 
+    public void setFaultNodeValue(String uri) {
+        this.setText(uri);
+    }
+
+    public String getFaultNodeValue() {
+        return this.getText();
+    }
+
+    public void setNodeValue(String uri) {
+        setFaultNodeValue(uri);
+    }
+
+    public String getNodeValue() {
+        return getFaultNodeValue();
+    }
+
     protected OMElement createClone(OMCloneOptions options, ParentNode targetParent,
             boolean generateNSDecl) {
         return new SOAP12FaultNodeImpl(targetParent, namespace, null, factory, generateNSDecl);

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultSubCodeImpl.java
Sat May 31 19:12:14 2014
@@ -27,19 +27,23 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.om.util.ElementHelper;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFaultCode;
 import org.apache.axiom.soap.SOAPFaultSubCode;
 import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.dom.SOAPFaultSubCodeImpl;
+import org.apache.axiom.soap.impl.dom.SOAPElement;
 
-public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl {
+public class SOAP12FaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode {
+    private SOAPFaultValue value;
+    private SOAPFaultSubCode subCode;
+    
     //changed
     public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultSubCodeImpl(ParentNode parentNode, OMNamespace ns,
@@ -49,7 +53,7 @@ public class SOAP12FaultSubCodeImpl exte
 
     public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, true, factory);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -68,7 +72,14 @@ public class SOAP12FaultSubCodeImpl exte
                     "Expecting SOAP 1.2 implementation of SOAP Fault " +
                             "Sub Code. But received some other implementation");
         }
-        super.setSubCode(subCode);
+        ElementHelper.setNewElement(this, this.subCode, subCode);
+    }
+
+    public SOAPFaultSubCode getSubCode() {
+        if (subCode == null) {
+            subCode = (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE);
+        }
+        return subCode;
     }
 
     public void setValue(SOAPFaultValue soapFaultSubCodeValue)
@@ -78,7 +89,14 @@ public class SOAP12FaultSubCodeImpl exte
                     "Expecting SOAP 1.2 implementation of SOAP Fault Value. " +
                             "But received some other implementation");
         }
-        super.setValue(soapFaultSubCodeValue);
+        ElementHelper.setNewElement(this, value, soapFaultSubCodeValue);
+    }
+
+    public SOAPFaultValue getValue() {
+        if (value == null) {
+            value = (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE);
+        }
+        return value;
     }
 
     public void setValue(QName value) {

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultTextImpl.java
Sat May 31 19:12:14 2014
@@ -19,27 +19,42 @@
 
 package org.apache.axiom.soap.impl.dom.soap12;
 
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.dom.AttrImpl;
+import org.apache.axiom.om.impl.dom.DocumentImpl;
 import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFaultReason;
+import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.dom.SOAPFaultTextImpl;
+import org.apache.axiom.soap.impl.dom.SOAPElement;
 
-public class SOAP12FaultTextImpl extends SOAPFaultTextImpl {
+public class SOAP12FaultTextImpl extends SOAPElement implements SOAPFaultText {
+    private OMAttribute langAttr;
+    private final OMNamespace langNamespace;
 
     public SOAP12FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     public SOAP12FaultTextImpl(ParentNode parentNode, OMNamespace ns, OMXMLParserWrapper
builder,
             OMFactory factory, boolean generateNSDecl) {
-        super(parentNode, ns, builder, factory, generateNSDecl);
+        super(parentNode, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, ns, builder, factory,
generateNSDecl);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -50,6 +65,27 @@ public class SOAP12FaultTextImpl extends
         }
     }
 
+    public void setLang(String lang) {
+        langAttr =
+                new AttrImpl((DocumentImpl)getOwnerDocument(),
+                             SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+                             langNamespace,
+                             lang, this.factory);
+        this.addAttribute(langAttr);
+    }
+
+    public String getLang() {
+        if (langAttr == null) {
+            langAttr =
+                    this.getAttribute(
+                            new QName(langNamespace.getNamespaceURI(),
+                                      SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+                                      SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+        }
+
+        return langAttr == null ? null : langAttr.getAttributeValue();
+    }
+
     protected OMElement createClone(OMCloneOptions options, ParentNode targetParent,
             boolean generateNSDecl) {
         return new SOAP12FaultTextImpl(targetParent, namespace, null, factory, generateNSDecl);

Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultValueImpl.java
Sat May 31 19:12:14 2014
@@ -25,20 +25,22 @@ import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.dom.SOAPFaultValueImpl;
+import org.apache.axiom.soap.impl.dom.SOAPElement;
 
-public class SOAP12FaultValueImpl extends SOAPFaultValueImpl {
+public class SOAP12FaultValueImpl extends SOAPElement implements SOAPFaultValue {
 
     public SOAP12FaultValueImpl(OMElement parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultValueImpl(ParentNode parentNode, OMNamespace ns, OMXMLParserWrapper
builder,
             OMFactory factory, boolean generateNSDecl) {
-        super(parentNode, ns, builder, factory, generateNSDecl);
+        super(parentNode, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, ns, builder, factory,
generateNSDecl);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultReasonImpl.java
Sat May 31 19:12:14 2014
@@ -68,8 +68,8 @@ public abstract class SOAPFaultReasonImp
         Iterator childrenIter = this.getChildren();
         while (childrenIter.hasNext()) {
             OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl))
{
-                faultTexts.add(((SOAPFaultTextImpl) node));
+            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText))
{
+                faultTexts.add(((SOAPFaultText) node));
             }
         }
         return faultTexts;
@@ -79,8 +79,8 @@ public abstract class SOAPFaultReasonImp
         Iterator childrenIter = this.getChildren();
         while (childrenIter.hasNext()) {
             OMNode node = (OMNode) childrenIter.next();
-            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultTextImpl)
&&
-                    (language == null || language.equals(((SOAPFaultTextImpl) node).getLang())))
{
+            if (node.getType() == OMNode.ELEMENT_NODE && (node instanceof SOAPFaultText)
&&
+                    (language == null || language.equals(((SOAPFaultText) node).getLang())))
{
                 return (SOAPFaultText) node;
             }
         }

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultNodeImpl.java
Sat May 31 19:12:14 2014
@@ -19,26 +19,30 @@
 
 package org.apache.axiom.soap.impl.llom.soap12;
 
+import org.apache.axiom.om.OMCloneOptions;
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultNode;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.llom.SOAPFaultNodeImpl;
+import org.apache.axiom.soap.impl.llom.SOAPElement;
 
-public class SOAP12FaultNodeImpl extends SOAPFaultNodeImpl {
+public class SOAP12FaultNodeImpl extends SOAPElement implements SOAPFaultNode {
 
     public SOAP12FaultNodeImpl(SOAPFactory factory) {
-        super(factory.getNamespace(), factory);
+        super(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, factory.getNamespace(), factory);
     }
 
     public SOAP12FaultNodeImpl(SOAPFault parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder, SOAPFactory
factory) {
-        super(parent, builder, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder, factory);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -47,4 +51,24 @@ public class SOAP12FaultNodeImpl extends
                     "Expecting SOAP12FaultImpl, got " + parent.getClass());
         }
     }
+
+    public void setFaultNodeValue(String uri) {
+        this.setText(uri);
+    }
+
+    public String getFaultNodeValue() {
+        return this.getText();
+    }
+
+    public void setNodeValue(String uri) {
+        setFaultNodeValue(uri);
+    }
+
+    public String getNodeValue() {
+        return getFaultNodeValue();
+    }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        return ((SOAPFactory)factory).createSOAPFaultNode((SOAPFault)targetParent);
+    }
 }

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultSubCodeImpl.java
Sat May 31 19:12:14 2014
@@ -21,25 +21,31 @@ package org.apache.axiom.soap.impl.llom.
 
 import javax.xml.namespace.QName;
 
+import org.apache.axiom.om.OMCloneOptions;
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.util.ElementHelper;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFaultCode;
 import org.apache.axiom.soap.SOAPFaultSubCode;
 import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.llom.SOAPFaultSubCodeImpl;
+import org.apache.axiom.soap.impl.llom.SOAPElement;
 
-public class SOAP12FaultSubCodeImpl extends SOAPFaultSubCodeImpl {
+public class SOAP12FaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode {
+    private SOAPFaultValue value;
+    private SOAPFaultSubCode subCode;
+    
     //changed
     public SOAP12FaultSubCodeImpl(SOAPFaultCode parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultSubCodeImpl(SOAPFactory factory) {
-        super(factory.getNamespace(), factory);
+        super(SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory.getNamespace(), factory);
     }
 
     //changed
@@ -52,7 +58,7 @@ public class SOAP12FaultSubCodeImpl exte
 
     public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultSubCodeImpl(SOAPFaultSubCode parent,
@@ -77,7 +83,14 @@ public class SOAP12FaultSubCodeImpl exte
             throw new SOAPProcessingException(
                     "Expecting SOAP12FaultSubCodeImpl, got " + subCode.getClass());
         }
-        super.setSubCode(subCode);
+        ElementHelper.setNewElement(this, this.subCode, subCode);
+    }
+
+    public SOAPFaultSubCode getSubCode() {
+        if (subCode == null) {
+            subCode = (SOAPFaultSubCode)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_SUBCODE);
+        }
+        return subCode;
     }
 
     public void setValue(SOAPFaultValue soapFaultSubCodeValue)
@@ -86,7 +99,14 @@ public class SOAP12FaultSubCodeImpl exte
             throw new SOAPProcessingException(
                     "Expecting SOAP12FaultValueImpl, got " + soapFaultSubCodeValue.getClass());
         }
-        super.setValue(soapFaultSubCodeValue);
+        ElementHelper.setNewElement(this, value, soapFaultSubCodeValue);
+    }
+
+    public SOAPFaultValue getValue() {
+        if (value == null) {
+            value = (SOAPFaultValue)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_VALUE);
+        }
+        return value;
     }
 
     public void setValue(QName value) {
@@ -101,4 +121,12 @@ public class SOAP12FaultSubCodeImpl exte
         SOAPFaultValue value = getValue();
         return value == null ? null : value.getTextAsQName();
     }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        if (targetParent instanceof SOAPFaultSubCode) {
+            return ((SOAPFactory)factory).createSOAPFaultSubCode((SOAPFaultSubCode)targetParent);
+        } else {
+            return ((SOAPFactory)factory).createSOAPFaultSubCode((SOAPFaultCode)targetParent);
+        }
+    }
 }

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultTextImpl.java
Sat May 31 19:12:14 2014
@@ -19,28 +19,48 @@
 
 package org.apache.axiom.soap.impl.llom.soap12;
 
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMCloneOptions;
+import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.llom.OMAttributeImpl;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFaultReason;
+import org.apache.axiom.soap.SOAPFaultText;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.llom.SOAPFaultTextImpl;
+import org.apache.axiom.soap.impl.llom.SOAPElement;
 
-public class SOAP12FaultTextImpl extends SOAPFaultTextImpl {
+public class SOAP12FaultTextImpl extends SOAPElement implements SOAPFaultText {
+    private OMAttribute langAttr;
+    private OMNamespace langNamespace = null;
 
     public SOAP12FaultTextImpl(SOAPFaultReason parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     public SOAP12FaultTextImpl(SOAPFactory factory) throws SOAPProcessingException {
-        super(factory.getNamespace(), factory);
+        super(SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, factory.getNamespace(), factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     public SOAP12FaultTextImpl(SOAPFaultReason parent,
                                OMXMLParserWrapper builder,
                                SOAPFactory factory) {
-        super(parent, builder, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder, factory);
+        this.langNamespace = factory.createOMNamespace(
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+                SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {
@@ -49,4 +69,32 @@ public class SOAP12FaultTextImpl extends
                     "Expecting SOAP12FaultReasonImpl as parent, got " + parent.getClass());
         }
     }
+
+    public void setLang(String lang) {
+        //langAttr = new OMAttributeImpl(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
parent.getNamespace(), lang);
+        langAttr =
+                new OMAttributeImpl(
+                        SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+                        langNamespace,
+                        lang,
+                        this.factory);
+        this.addAttribute(langAttr);
+    }
+
+    public String getLang() {
+        if (langAttr == null) {
+            //langAttr = this.getFirstAttribute(new QName(SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
parent.getNamespace().getName()));
+            langAttr =
+                    this.getAttribute(
+                            new QName(langNamespace.getNamespaceURI(),
+                                      SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+                                      SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+        }
+
+        return langAttr == null ? null : langAttr.getAttributeValue();
+    }
+
+    protected OMElement createClone(OMCloneOptions options, OMContainer targetParent) {
+        return ((SOAPFactory)factory).createSOAPFaultText((SOAPFaultReason)targetParent);
+    }
 }

Modified: webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.java?rev=1598905&r1=1598904&r2=1598905&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.java
(original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultValueImpl.java
Sat May 31 19:12:14 2014
@@ -21,26 +21,27 @@ package org.apache.axiom.soap.impl.llom.
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultValue;
 import org.apache.axiom.soap.SOAPProcessingException;
-import org.apache.axiom.soap.impl.llom.SOAPFaultValueImpl;
+import org.apache.axiom.soap.impl.llom.SOAPElement;
 
-
-public class SOAP12FaultValueImpl extends SOAPFaultValueImpl {
+public class SOAP12FaultValueImpl extends SOAPElement implements SOAPFaultValue {
 
     public SOAP12FaultValueImpl(OMElement parent, SOAPFactory factory)
             throws SOAPProcessingException {
-        super(parent, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true, factory);
     }
 
     public SOAP12FaultValueImpl(SOAPFactory factory)
             throws SOAPProcessingException {
-        super(factory.getNamespace(), factory);
+        super(SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, factory.getNamespace(), factory);
     }
 
     public SOAP12FaultValueImpl(OMElement parent, OMXMLParserWrapper builder,
                                 SOAPFactory factory) {
-        super(parent, builder, factory);
+        super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder, factory);
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {



Mime
View raw message