ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1697242 - in /webservices/axiom/trunk: aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/ implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/ implementations/axiom-dom/src/main/java/org/apache/axiom/soa...
Date Sun, 23 Aug 2015 20:16:21 GMT
Author: veithen
Date: Sun Aug 23 20:16:20 2015
New Revision: 1697242

URL: http://svn.apache.org/r1697242
Log:
Increase test coverage and fix some minor issues in the Axiom SOAP implementation.

Added:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj
  (with props)
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java
  (with props)
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java
  (with props)
Modified:
    webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
    webservices/axiom/trunk/implementations/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
    webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
    webservices/axiom/trunk/implementations/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java

Added: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj?rev=1697242&view=auto
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj
(added)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj
Sun Aug 23 20:16:20 2015
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.soap.impl.common;
+
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+
+public aspect AxiomSOAPBodySupport {
+    public final SOAPFault AxiomSOAPBody.addFault(Exception e) throws OMException {
+        return ((SOAPFactory)getOMFactory()).createSOAPFault(this, e);
+    }
+}

Propchange: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPBodySupport.aj
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
(original)
+++ webservices/axiom/trunk/aspects/om-aspects/src/main/java/org/apache/axiom/soap/impl/common/AxiomSOAPFactorySupport.aj
Sun Aug 23 20:16:20 2015
@@ -131,6 +131,12 @@ public aspect AxiomSOAPFactorySupport {
         return createSOAPFault(null, (OMXMLParserWrapper)null);
     }
 
+    public final SOAPFault AxiomSOAPFactory.createSOAPFault(SOAPBody parent, Exception e)
{
+        SOAPFault fault = createSOAPFault(parent, (OMXMLParserWrapper)null);
+        fault.setException(e);
+        return fault;
+    }
+
     public final SOAPFaultCode AxiomSOAPFactory.createSOAPFaultCode(SOAPFault parent, OMXMLParserWrapper
builder) {
         SOAPHelper helper = getSOAPHelper();
         return createSOAPElement(helper.getFaultCodeClass(), parent, helper.getFaultCodeQName(),
builder);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -27,8 +27,6 @@ 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.SOAPConstants;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPProcessingException;
 import org.apache.axiom.soap.impl.common.AxiomSOAPBody;
@@ -45,17 +43,6 @@ public abstract class SOAPBodyImpl exten
     }
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code>
object.
-     *
-     * @param e
-     * @return the new <code>SOAPFault</code> object
-     * @throws org.apache.axiom.om.OMException
-     *                     if there is a SOAP error
-     * @throws OMException
-     */
-    public abstract SOAPFault addFault(Exception e) throws OMException;
-
-    /**
      * Indicates whether a <code>SOAPFault</code> object exists in this <code>SOAPBody</code>
object.
      *
      * @return <code>true</code> if a <code>SOAPFault</code> object
exists in this

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -27,9 +27,7 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.NSAwareElement;
 import org.apache.axiom.om.impl.dom.ParentNode;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPConstants;
-import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
 import org.apache.axiom.soap.SOAPProcessingException;
@@ -49,18 +47,6 @@ public abstract class SOAPFaultImpl exte
         super(factory);
     }
 
-    /**
-     * Constructor SOAPFaultImpl
-     *
-     * @param parent
-     * @param e
-     */
-    public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
-        setException(e);
-    }
-
     public void setException(Exception e) {
         this.e = e;
         putExceptionToSOAPFault(e);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11BodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -21,13 +21,10 @@ package org.apache.axiom.soap.impl.dom.s
 
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
 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.SOAPFactory;
-import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.impl.common.AxiomSOAP11Body;
 import org.apache.axiom.soap.impl.dom.SOAPBodyImpl;
 
@@ -41,10 +38,6 @@ public class SOAP11BodyImpl extends SOAP
         super(parentNode, ns, builder, factory, generateNSDecl);
     }
 
-    public SOAPFault addFault(Exception e) throws OMException {
-        return new SOAP11FaultImpl(this, e, (SOAPFactory)getOMFactory());
-    }
-
     protected OMElement createClone(OMCloneOptions options, ParentNode targetParent, boolean
generateNSDecl) {
         return new SOAP11BodyImpl(targetParent, getNamespace(), null, getOMFactory(), generateNSDecl);
     }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
Sun Aug 23 20:16:20 2015
@@ -23,7 +23,6 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPProcessingException;
@@ -50,11 +49,6 @@ public class SOAP11Factory extends SOAPF
         return SOAP11Version.getSingleton();
     }
 
-    public SOAPFault createSOAPFault(SOAPBody parent, Exception e)
-            throws SOAPProcessingException {
-        return new SOAP11FaultImpl(parent, e, this);
-    }
-
     public OMNamespace getNamespace() {
         return new OMNamespaceImpl(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                  SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11FaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -25,7 +25,6 @@ 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.SOAPBody;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
@@ -38,11 +37,6 @@ public class SOAP11FaultImpl extends SOA
         super(factory);
     }
 
-    public SOAP11FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, e, factory);
-    }
-
     public SOAP11FaultImpl(ParentNode parentNode, OMNamespace ns, OMXMLParserWrapper builder,
             OMFactory factory, boolean generateNSDecl) {
         super(parentNode, ns, builder, factory, generateNSDecl);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12BodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -21,13 +21,10 @@ package org.apache.axiom.soap.impl.dom.s
 
 import org.apache.axiom.om.OMCloneOptions;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
 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.SOAPFactory;
-import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.impl.common.AxiomSOAP12Body;
 import org.apache.axiom.soap.impl.dom.SOAPBodyImpl;
 
@@ -41,10 +38,6 @@ public class SOAP12BodyImpl extends SOAP
         super(parentNode, ns, builder, factory, generateNSDecl);
     }
 
-    public SOAPFault addFault(Exception e) throws OMException {
-        return new SOAP12FaultImpl(this, e, (SOAPFactory)getOMFactory());
-    }
-
     protected OMElement createClone(OMCloneOptions options, ParentNode targetParent, boolean
generateNSDecl) {
         return new SOAP12BodyImpl(targetParent, getNamespace(), null, getOMFactory(), generateNSDecl);
     }

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
Sun Aug 23 20:16:20 2015
@@ -23,7 +23,6 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultCode;
@@ -52,10 +51,6 @@ public class SOAP12Factory extends SOAPF
         return SOAP12Version.getSingleton();
     }
 
-    public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException
{
-        return new SOAP12FaultImpl(parent, e, this);
-    }
-
     public OMNamespace getNamespace() {
         return new OMNamespaceImpl(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                                  SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -25,7 +25,6 @@ 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.SOAPBody;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
@@ -38,11 +37,6 @@ public class SOAP12FaultImpl extends SOA
         super(factory);
     }
 
-    public SOAP12FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, e, factory);
-    }
-
     public SOAP12FaultImpl(ParentNode parentNode, OMNamespace ns, OMXMLParserWrapper builder,
             OMFactory factory, boolean generateNSDecl) {
         super(parentNode, ns, builder, factory, generateNSDecl);

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12FaultRoleImpl.java
Sun Aug 23 20:16:20 2015
@@ -25,9 +25,6 @@ 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.SOAPProcessingException;
 import org.apache.axiom.soap.impl.common.AxiomSOAP12FaultRole;
 import org.apache.axiom.soap.impl.dom.SOAPFaultRoleImpl;

Modified: webservices/axiom/trunk/implementations/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
Sun Aug 23 20:16:20 2015
@@ -23,7 +23,6 @@ import junit.framework.TestSuite;
 
 import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
 import org.apache.axiom.ts.soap.SOAPTestSuiteBuilder;
-import org.apache.axiom.ts.soap.factory.TestCreateSOAPElementWithNullParent;
 
 public class SOAPImplementationTest extends TestCase {
     public static TestSuite suite() {
@@ -37,9 +36,6 @@ public class SOAPImplementationTest exte
         builder.exclude(org.apache.axiom.ts.soap.headerblock.TestWrongParent2.class);
         builder.exclude(org.apache.axiom.ts.soap.headerblock.TestWrongParent3.class);
         
-        // TODO: need to decide what the correct behavior is (other OMFactory methods allow
null parents)
-        builder.exclude(TestCreateSOAPElementWithNullParent.class);
-        
         return builder.build();
     }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPBodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -51,18 +51,6 @@ public abstract class SOAPBodyImpl exten
     }
 
     /**
-     * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code>
-     * object.
-     *
-     * @param e
-     * @return the new <code>SOAPFault</code> object
-     * @throws org.apache.axiom.om.OMException
-     *                     if there is a SOAP error
-     * @throws OMException
-     */
-    public abstract SOAPFault addFault(Exception e) throws OMException;
-
-    /**
      * Indicates whether a <code>SOAPFault</code> object exists in this <code>SOAPBody</code>
      * object.
      *

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -49,18 +49,6 @@ public abstract class SOAPFaultImpl exte
         super(factory);
     }
 
-    /**
-     * Constructor SOAPFaultImpl
-     *
-     * @param parent
-     * @param e
-     */
-    public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
-        setException(e);
-    }
-
     public void setException(Exception e) {
         this.e = e;
         putExceptionToSOAPFault(e);

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11BodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -19,9 +19,7 @@
 
 package org.apache.axiom.soap.impl.llom.soap11;
 
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.impl.common.AxiomSOAP11Body;
 import org.apache.axiom.soap.impl.llom.SOAPBodyImpl;
 
@@ -29,8 +27,4 @@ public class SOAP11BodyImpl extends SOAP
     public SOAP11BodyImpl(OMFactory factory) {
         super(factory);
     }
-
-    public SOAPFault addFault(Exception e) throws OMException {
-        return ((SOAP11Factory)getOMFactory()).createSOAPFault(this, e);
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
Sun Aug 23 20:16:20 2015
@@ -25,7 +25,6 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.common.OMNamespaceImpl;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
 import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPHeaderBlock;
@@ -78,11 +77,6 @@ public class SOAP11Factory extends SOAPF
         return new SOAP11HeaderBlockImpl(localName, ns, this, ds);
     }
 
-    public SOAPFault createSOAPFault(SOAPBody parent, Exception e)
-            throws SOAPProcessingException {
-        return new SOAP11FaultImpl(parent, e, this);
-    }
-
     public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException {
         SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
         SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11FaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -21,7 +21,6 @@ package org.apache.axiom.soap.impl.llom.
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
@@ -34,11 +33,6 @@ public class SOAP11FaultImpl extends SOA
         super(factory);
     }
 
-    public SOAP11FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, e, factory);
-    }
-
     protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault)
             throws SOAPProcessingException {
         return new SOAP11FaultDetailImpl(fault, (SOAPFactory)getOMFactory());

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12BodyImpl.java
Sun Aug 23 20:16:20 2015
@@ -19,10 +19,7 @@
 
 package org.apache.axiom.soap.impl.llom.soap12;
 
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.impl.common.AxiomSOAP12Body;
 import org.apache.axiom.soap.impl.llom.SOAPBodyImpl;
 
@@ -30,9 +27,4 @@ public class SOAP12BodyImpl extends SOAP
     public SOAP12BodyImpl(OMFactory factory) {
         super(factory);
     }
-
-    public SOAPFault addFault(Exception e) throws OMException {
-        return new SOAP12FaultImpl(this, e,
-                                   (SOAPFactory)getOMFactory());
-    }
 }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
Sun Aug 23 20:16:20 2015
@@ -26,7 +26,6 @@ import org.apache.axiom.om.impl.common.O
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAP12Version;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultCode;
@@ -69,11 +68,6 @@ public class SOAP12Factory extends SOAPF
                                    SOAP12Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
     }
 
-    public SOAPFault createSOAPFault(SOAPBody parent, Exception e)
-            throws SOAPProcessingException {
-        return new SOAP12FaultImpl(parent, e, this);
-    }
-
     public SOAPHeaderBlock createSOAPHeaderBlock(OMDataSource source) {
         return new SOAP12HeaderBlockImpl(this, source);
     }

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultImpl.java
Sun Aug 23 20:16:20 2015
@@ -21,7 +21,6 @@ package org.apache.axiom.soap.impl.llom.
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPFaultDetail;
@@ -34,11 +33,6 @@ public class SOAP12FaultImpl extends SOA
         super(factory);
     }
 
-    public SOAP12FaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
-            throws SOAPProcessingException {
-        super(parent, e, factory);
-    }
-
     protected SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault) {
         return new SOAP12FaultDetailImpl(fault, (SOAPFactory)getOMFactory());
 

Modified: webservices/axiom/trunk/implementations/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
(original)
+++ webservices/axiom/trunk/implementations/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
Sun Aug 23 20:16:20 2015
@@ -24,7 +24,6 @@ import junit.framework.TestSuite;
 import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
 import org.apache.axiom.ts.soap.SOAPTestSuiteBuilder;
 import org.apache.axiom.ts.soap.envelope.TestClone;
-import org.apache.axiom.ts.soap.factory.TestCreateSOAPElementWithNullParent;
 
 public class SOAPImplementationTest extends TestCase {
     public static TestSuite suite() {
@@ -33,9 +32,6 @@ public class SOAPImplementationTest exte
         // TODO
         builder.exclude(TestClone.class, "(message=soap/soap11/soapfault2.xml)");
         
-        // TODO: need to decide what the correct behavior is (other OMFactory methods allow
null parents)
-        builder.exclude(TestCreateSOAPElementWithNullParent.class);
-        
         return builder.build();
     }
 }

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1697242&r1=1697241&r2=1697242&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Sun Aug 23 20:16:20 2015
@@ -192,6 +192,7 @@ public class SOAPTestSuiteBuilder extend
             addTest(new org.apache.axiom.ts.soap.fault.TestChildOrder(metaFactory, spec,
                     new SOAPFaultChild[] { SOAPFaultChild.CODE, SOAPFaultChild.REASON, SOAPFaultChild.DETAIL,
SOAPFaultChild.REASON }, ss));
         }
+        addTest(new org.apache.axiom.ts.soap.fault.TestCloneWithException(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.fault.TestGetCodeWithParser(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.fault.TestGetDetailWithParser(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.fault.TestGetException(metaFactory, spec));
@@ -257,6 +258,9 @@ public class SOAPTestSuiteBuilder extend
         if (supportsOMSourcedElement) {
             addTest(new org.apache.axiom.ts.soap.headerblock.TestByteArrayDS(metaFactory,
spec));
         }
+        addTest(new org.apache.axiom.ts.soap.headerblock.TestClone(metaFactory, spec, Boolean.TRUE));
+        addTest(new org.apache.axiom.ts.soap.headerblock.TestClone(metaFactory, spec, Boolean.FALSE));
+        addTest(new org.apache.axiom.ts.soap.headerblock.TestClone(metaFactory, spec, null));
         addTest(new org.apache.axiom.ts.soap.headerblock.TestGetRole(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.headerblock.TestGetVersion(metaFactory, spec));
         for (int i=0; i<booleanLiterals.length; i++) {

Added: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java?rev=1697242&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java
(added)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java
Sun Aug 23 20:16:20 2015
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.soap.fault;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPCloneOptions;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.soap.SOAPTestCase;
+
+public class TestCloneWithException extends SOAPTestCase {
+    public TestCloneWithException(OMMetaFactory metaFactory, SOAPSpec spec) {
+        super(metaFactory, spec);
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        Exception ex = new Exception();
+        SOAPFault org = soapFactory.createSOAPFault(null, ex);
+        SOAPCloneOptions options = new SOAPCloneOptions();
+        options.setPreserveModel(true);
+        SOAPFault clone = (SOAPFault)org.clone(options);
+        assertThat(clone.getException()).isNotNull();
+        // TODO: this is not true because getException doesn't return the original exception
+//        assertThat(clone.getException()).isSameAs(ex);
+    }
+}

Propchange: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestCloneWithException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java?rev=1697242&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java
(added)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java
Sun Aug 23 20:16:20 2015
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.soap.headerblock;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.soap.SOAPCloneOptions;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.soap.SOAPTestCase;
+
+public class TestClone extends SOAPTestCase {
+    private final Boolean processed;
+
+    public TestClone(OMMetaFactory metaFactory, SOAPSpec spec, Boolean processed) {
+        super(metaFactory, spec);
+        this.processed = processed;
+        addTestParameter("processed", String.valueOf(processed));
+    }
+
+    private void checkProcessed(SOAPHeader clonedHeader, SOAPHeaderBlock orgHeaderBlock)
{
+        SOAPHeaderBlock clonedHeaderBlock = (SOAPHeaderBlock)clonedHeader.getFirstChildWithName(orgHeaderBlock.getQName());
+        assertThat(clonedHeaderBlock.isProcessed()).isEqualTo(processed == null ? orgHeaderBlock.isProcessed()
: processed);
+    }
+    
+    @Override
+    protected void runTest() throws Throwable {
+        SOAPHeader header = soapFactory.createSOAPHeader();
+        OMNamespace ns = soapFactory.createOMNamespace("urn:test", "p");
+        SOAPHeaderBlock unprocessedHeaderBlock = header.addHeaderBlock("unprocessed", ns);
+        SOAPHeaderBlock processedHeaderBlock = header.addHeaderBlock("processed", ns);
+        processedHeaderBlock.setProcessed();
+        SOAPCloneOptions options = new SOAPCloneOptions();
+        options.setPreserveModel(true);
+        options.setProcessedFlag(processed);
+        SOAPHeader clonedHeader = (SOAPHeader)header.clone(options);
+        checkProcessed(clonedHeader, unprocessedHeaderBlock);
+        checkProcessed(clonedHeader, processedHeaderBlock);
+    }
+}

Propchange: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/headerblock/TestClone.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message