You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2014/06/03 23:03:13 UTC
svn commit: r1599797 - in /webservices/axiom/trunk: axiom-spring-ws/
modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/
modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/
modules/axiom-impl/src/test/java/org/apache/axiom/soap/...
Author: veithen
Date: Tue Jun 3 21:03:12 2014
New Revision: 1599797
URL: http://svn.apache.org/r1599797
Log:
AXIOM-447 - Iteration 4 - Implementation: Fixed an issue in DOOM's SOAPMessage implementation to make the Axiom/Spring-WS integration work with DOOM.
Added:
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java (with props)
Modified:
webservices/axiom/trunk/axiom-spring-ws/pom.xml
webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java
webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Modified: webservices/axiom/trunk/axiom-spring-ws/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/axiom-spring-ws/pom.xml?rev=1599797&r1=1599796&r2=1599797&view=diff
==============================================================================
--- webservices/axiom/trunk/axiom-spring-ws/pom.xml (original)
+++ webservices/axiom/trunk/axiom-spring-ws/pom.xml Tue Jun 3 21:03:12 2014
@@ -117,6 +117,7 @@
<configuration>
<includes>
<include>**/LLOMSpringWSTest.java</include>
+ <include>**/DOOMSpringWSTest.java</include>
</includes>
</configuration>
</plugin>
Modified: webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java?rev=1599797&r1=1599796&r2=1599797&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java (original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPMessageImpl.java Tue Jun 3 21:03:12 2014
@@ -61,7 +61,7 @@ public class SOAPMessageImpl extends Doc
protected void internalSerialize(Serializer serializer, OMOutputFormat format,
boolean cache, boolean includeXMLDeclaration) throws OutputException {
- ((NodeImpl)getOwnerDocument().getDocumentElement()).internalSerialize(serializer, format, cache);
+ ((NodeImpl)getDocumentElement()).internalSerialize(serializer, format, cache);
}
protected DocumentImpl createClone(OMCloneOptions options) {
Modified: webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java?rev=1599797&r1=1599796&r2=1599797&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java (original)
+++ webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java Tue Jun 3 21:03:12 2014
@@ -30,7 +30,8 @@ public class SOAPImplementationTest exte
SOAPTestSuiteBuilder builder = new SOAPTestSuiteBuilder(new OMDOMMetaFactory(), false, false);
// TODO: AXIOM-430
- builder.exclude(TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
+ builder.exclude(org.apache.axiom.ts.soap.envelope.TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
+ builder.exclude(org.apache.axiom.ts.soap.message.TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
return builder.build();
}
Modified: webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java?rev=1599797&r1=1599796&r2=1599797&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java (original)
+++ webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java Tue Jun 3 21:03:12 2014
@@ -23,14 +23,14 @@ 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.TestSerialize;
public class SOAPImplementationTest extends TestCase {
public static TestSuite suite() {
SOAPTestSuiteBuilder builder = new SOAPTestSuiteBuilder(new OMLinkedListMetaFactory(), true, true);
// TODO: AXIOM-430
- builder.exclude(TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
+ builder.exclude(org.apache.axiom.ts.soap.envelope.TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
+ builder.exclude(org.apache.axiom.ts.soap.message.TestSerialize.class, "(&(file=*/empty-header.xml)(|(serializationStrategy=OutputStream)(serializationStrategy=Writer)(serializationStrategy=XMLStreamWriter)(serializationStrategy=SAXSource)))");
return builder.build();
}
Modified: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1599797&r1=1599796&r2=1599797&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java (original)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java Tue Jun 3 21:03:12 2014
@@ -294,6 +294,7 @@ public class SOAPTestSuiteBuilder extend
for (int j=0; j<expansionStrategies.length; j++) {
for (int k=0; k<serializationStrategies.length; k++) {
addTest(new org.apache.axiom.ts.soap.envelope.TestSerialize(metaFactory, goodSOAPFiles[i], expansionStrategies[j], serializationStrategies[k]));
+ addTest(new org.apache.axiom.ts.soap.message.TestSerialize(metaFactory, goodSOAPFiles[i], expansionStrategies[j], serializationStrategies[k]));
}
}
}
Added: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java?rev=1599797&view=auto
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java (added)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java Tue Jun 3 21:03:12 2014
@@ -0,0 +1,57 @@
+/*
+ * 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.message;
+
+import org.apache.axiom.om.AbstractTestCase;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.soap.SOAPMessage;
+import org.apache.axiom.ts.AxiomTestCase;
+import org.apache.axiom.ts.dimension.ExpansionStrategy;
+import org.apache.axiom.ts.dimension.serialization.SerializationStrategy;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.xml.sax.InputSource;
+
+public class TestSerialize extends AxiomTestCase {
+ private final String file;
+ private final ExpansionStrategy expansionStrategy;
+ private final SerializationStrategy serializationStrategy;
+
+ public TestSerialize(OMMetaFactory metaFactory, String file,
+ ExpansionStrategy expansionStrategy, SerializationStrategy serializationStrategy) {
+ super(metaFactory);
+ this.file = file;
+ this.expansionStrategy = expansionStrategy;
+ this.serializationStrategy = serializationStrategy;
+ addTestParameter("file", file);
+ expansionStrategy.addTestParameters(this);
+ serializationStrategy.addTestParameters(this);
+ }
+
+ protected void runTest() throws Throwable {
+ SOAPMessage message = OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory,
+ AbstractTestCase.getTestResource(file), null).getSOAPMessage();
+ expansionStrategy.apply(message);
+ XMLAssert.assertXMLIdentical(XMLUnit.compareXML(
+ new InputSource(AbstractTestCase.getTestResource(file)),
+ serializationStrategy.serialize(message).getInputSource()), true);
+ message.close(false);
+ }
+}
Propchange: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/message/TestSerialize.java
------------------------------------------------------------------------------
svn:eol-style = native