ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1340062 - in /webservices/commons/trunk/modules/axiom/modules: axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/ axiom-tests/src/test/java/org/apache/axiom/om/util/ axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/ axiom-testsu...
Date Fri, 18 May 2012 10:39:54 GMT
Author: veithen
Date: Fri May 18 10:39:54 2012
New Revision: 1340062

URL: http://svn.apache.org/viewvc?rev=1340062&view=rev
Log:
AXIOM-311: Refactored CopyUtilsTest.

Added:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/CloneOMElementTestCase.java
      - copied, changed from r1339113, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java
  (with props)
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java
  (with props)
Removed:
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java
Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java?rev=1340062&r1=1340061&r2=1340062&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPHeaderBlockImpl.java
Fri May 18 10:39:54 2012
@@ -125,7 +125,7 @@ public abstract class SOAPHeaderBlockImp
     }
 
     public boolean isExpanded() {
-        throw new UnsupportedOperationException();
+        return true;
     }
 
     public OMDataSource setDataSource(OMDataSource dataSource) {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1340062&r1=1340061&r2=1340062&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Fri May 18 10:39:54 2012
@@ -82,6 +82,10 @@ public class SOAPTestSuiteBuilder extend
         }
         addTest(new org.apache.axiom.ts.soap.envelope.TestAddHeaderToIncompleteEnvelope(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.envelope.TestBodyHeaderOrder(metaFactory, spec));
+        if (supportsOMSourcedElement) {
+            addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElementWithSourcedElement1(metaFactory,
spec));
+            addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElementWithSourcedElement2(metaFactory,
spec));
+        }
         addTest(new org.apache.axiom.ts.soap.envelope.TestDetach(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.envelope.TestDiscardHeader(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.envelope.TestGetBody(metaFactory, spec));
@@ -164,6 +168,14 @@ public class SOAPTestSuiteBuilder extend
         for (int i=0; i<goodSOAPFiles.length; i++) {
             addTest(new org.apache.axiom.ts.soap.builder.MessageTest(metaFactory, goodSOAPFiles[i]));
         }
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"sample1.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"soapmessage.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"soapmessage1.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"whitespacedMessage.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"minimalMessage.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"reallyReallyBigMessage.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"emtyBodymessage.xml"));
+        addTest(new org.apache.axiom.ts.soap.envelope.TestCloneOMElement(metaFactory, SOAPSpec.SOAP11,
"soap11fault.xml")); 
         addTest(new org.apache.axiom.ts.soap11.envelope.TestAddElementAfterBody(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.fault.TestGetNode(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.fault.TestSetNode(metaFactory));

Copied: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/CloneOMElementTestCase.java
(from r1339113, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/CloneOMElementTestCase.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/CloneOMElementTestCase.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java&r1=1339113&r2=1340062&rev=1340062&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/util/CopyUtilsTest.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/CloneOMElementTestCase.java
Fri May 18 10:39:54 2012
@@ -16,133 +16,38 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.om.util;
+package org.apache.axiom.ts.soap.envelope;
 
-import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMSourcedElement;
-import org.apache.axiom.om.OMXMLBuilderFactory;
-import org.apache.axiom.om.OMXMLParserWrapper;
-import org.apache.axiom.om.TestConstants;
-import org.apache.axiom.om.ds.ByteArrayDataSource;
-import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPCloneOptions;
 import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.soap.SOAPFactory;
-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;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.custommonkey.xmlunit.XMLUnit;
 
-import java.io.InputStream;
 import java.util.Iterator;
 
-/**
- * Validates CopyUtils 
- */
-public class CopyUtilsTest extends AbstractTestCase {
-
-    public CopyUtilsTest(String testName) {
-        super(testName);
+public abstract class CloneOMElementTestCase extends SOAPTestCase {
+    public CloneOMElementTestCase(OMMetaFactory metaFactory, SOAPSpec spec) {
+        super(metaFactory, spec);
     }
-    
-    public void testSample1() throws Exception {
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.SAMPLE1)));
-    }
-    
-    public void testSOAPMESSAGE() throws Exception {
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.SOAP_SOAPMESSAGE)));
-    }
-    
-    public void testSOAPMESSAGE1() throws Exception {
-        // Ignore the serialization comparison
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.SOAP_SOAPMESSAGE1)));
-    }
-    
-    public void testWHITESPACE_MESSAGE() throws Exception {
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.WHITESPACE_MESSAGE)));
-    }
-    
-    public void testMINIMAL_MESSAGE() throws Exception {
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.MINIMAL_MESSAGE)));
-    }
-    public void testREALLY_BIG_MESSAGE() throws Exception {
-        // Ignore the serialization comparison
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.REALLY_BIG_MESSAGE)));
-    }
-    public void testEMPTY_BODY_MESSAGE() throws Exception {
-        copyAndCheck(createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE)));
-    }
-    
-    public void testSoap11fault() throws Exception { 
-        copyAndCheck(createEnvelope(getTestResource("soap/soap11/soap11fault.xml"))); 
-    }
-    
-    public void testOMSE() throws Exception {
-        SOAPEnvelope sourceEnv = createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE));
-        SOAPBody body = sourceEnv.getBody();
-        
-        // Create a payload
-        String text = "<tns:payload xmlns:tns=\"urn://test\">Hello World</tns:payload>";
-        String encoding = "UTF-8";
-        ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding);
-        OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns");
-        OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns);
-        body.addChild(omse);
-        copyAndCheck(sourceEnv);
-    }
-    
-    public void testOMSE2() throws Exception {
-        SOAPEnvelope sourceEnv = createEnvelope(getTestResource(TestConstants.EMPTY_BODY_MESSAGE));
-        SOAPBody body = sourceEnv.getBody();
-        SOAPHeader header = sourceEnv.getHeader();
-        String encoding = "UTF-8";
-        
-        // Create a header OMSE
-        String hdrText = "<hdr:myheader xmlns:hdr=\"urn://test\">Hello World</hdr:myheader>";
-        ByteArrayDataSource badsHdr = 
-            new ByteArrayDataSource(hdrText.getBytes(encoding), encoding);
-        OMNamespace hdrNS = header.getOMFactory().createOMNamespace("urn://test", "hdr");
-        SOAPFactory sf = (SOAPFactory) header.getOMFactory();
-        SOAPHeaderBlock shb = sf.createSOAPHeaderBlock("myheader", hdrNS, badsHdr);
-        shb.setProcessed();  // test setting processing flag
-        header.addChild(shb);
-        
-        // Create a payload
-        String text = "<tns:payload xmlns:tns=\"urn://test\">Hello World</tns:payload>";
-        ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding);
-        OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns");
-        OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns);
-        body.addChild(omse);
-        
-        copyAndCheck(sourceEnv);
-        
-        // The source SOAPHeaderBlock should not be expanded in the process
-        assertFalse(shb.isExpanded());
-        
-    }
-    
-    /**
-     * Create SOAPEnvelope from the test in the indicated file
-     * @param in
-     * @return
-     * @throws Exception
-     */
-    protected SOAPEnvelope createEnvelope(InputStream in) throws Exception {
-        OMXMLParserWrapper builder = OMXMLBuilderFactory.createSOAPModelBuilder(in, null);
-        return (SOAPEnvelope) builder.getDocumentElement();
-    }
-    
+
     /**
      * Make a copy of the source envelope and validate the target tree
      * @param sourceEnv
-     * @param checkText (if true, check the serialization of the source and target tree)
      * @throws Exception
      */
     protected void copyAndCheck(SOAPEnvelope sourceEnv) throws Exception {
        
-        SOAPEnvelope targetEnv = CopyUtils.copy(sourceEnv);
+        SOAPCloneOptions options = new SOAPCloneOptions();
+        options.setFetchDataHandlers(true);
+        options.setPreserveModel(true);
+        options.setCopyOMDataSources(true);
+        SOAPEnvelope targetEnv = (SOAPEnvelope)sourceEnv.cloneOMElement(options);
         
         identityCheck(sourceEnv, targetEnv, "");
         

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java?rev=1340062&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java
Fri May 18 10:39:54 2012
@@ -0,0 +1,36 @@
+/*
+ * 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.envelope;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.ts.soap.SOAPSpec;
+
+public class TestCloneOMElement extends CloneOMElementTestCase {
+    private final String file;
+
+    public TestCloneOMElement(OMMetaFactory metaFactory, SOAPSpec spec, String file) {
+        super(metaFactory, spec);
+        this.file = file;
+        addTestProperty("file", file);
+    }
+
+    protected void runTest() throws Throwable {
+        copyAndCheck(getTestMessage(file));
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElement.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java?rev=1340062&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java
Fri May 18 10:39:54 2012
@@ -0,0 +1,47 @@
+/*
+ * 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.envelope;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMSourcedElement;
+import org.apache.axiom.om.ds.ByteArrayDataSource;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.ts.soap.SOAPSpec;
+
+public class TestCloneOMElementWithSourcedElement1 extends CloneOMElementTestCase {
+    public TestCloneOMElementWithSourcedElement1(OMMetaFactory metaFactory, SOAPSpec spec)
{
+        super(metaFactory, spec);
+    }
+
+    protected void runTest() throws Throwable {
+        SOAPEnvelope sourceEnv = soapFactory.getDefaultEnvelope();
+        SOAPBody body = sourceEnv.getBody();
+        
+        // Create a payload
+        String text = "<tns:payload xmlns:tns=\"urn://test\">Hello World</tns:payload>";
+        String encoding = "UTF-8";
+        ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding);
+        OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns");
+        OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns);
+        body.addChild(omse);
+        copyAndCheck(sourceEnv);
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java?rev=1340062&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java
Fri May 18 10:39:54 2012
@@ -0,0 +1,65 @@
+/*
+ * 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.envelope;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMSourcedElement;
+import org.apache.axiom.om.ds.ByteArrayDataSource;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.ts.soap.SOAPSpec;
+
+public class TestCloneOMElementWithSourcedElement2 extends CloneOMElementTestCase {
+    public TestCloneOMElementWithSourcedElement2(OMMetaFactory metaFactory, SOAPSpec spec)
{
+        super(metaFactory, spec);
+    }
+
+    protected void runTest() throws Throwable {
+        SOAPEnvelope sourceEnv = soapFactory.getDefaultEnvelope();
+        SOAPBody body = sourceEnv.getBody();
+        SOAPHeader header = sourceEnv.getHeader();
+        String encoding = "UTF-8";
+        
+        // Create a header OMSE
+        String hdrText = "<hdr:myheader xmlns:hdr=\"urn://test\">Hello World</hdr:myheader>";
+        ByteArrayDataSource badsHdr = 
+            new ByteArrayDataSource(hdrText.getBytes(encoding), encoding);
+        OMNamespace hdrNS = header.getOMFactory().createOMNamespace("urn://test", "hdr");
+        SOAPFactory sf = (SOAPFactory) header.getOMFactory();
+        SOAPHeaderBlock shb = sf.createSOAPHeaderBlock("myheader", hdrNS, badsHdr);
+        shb.setProcessed();  // test setting processing flag
+        header.addChild(shb);
+        
+        // Create a payload
+        String text = "<tns:payload xmlns:tns=\"urn://test\">Hello World</tns:payload>";
+        ByteArrayDataSource bads = new ByteArrayDataSource(text.getBytes(encoding), encoding);
+        OMNamespace ns = body.getOMFactory().createOMNamespace("urn://test", "tns");
+        OMSourcedElement omse =body.getOMFactory().createOMElement(bads, "payload", ns);
+        body.addChild(omse);
+        
+        copyAndCheck(sourceEnv);
+        
+        // The source SOAPHeaderBlock should not be expanded in the process
+        assertFalse(shb.isExpanded());
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestCloneOMElementWithSourcedElement2.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message