Author: veithen
Date: Sun May 31 10:41:55 2015
New Revision: 1682712
URL: http://svn.apache.org/r1682712
Log:
AXIOM-311: Use SOAP 1.2 fault sample from soap-testsuite.
Added:
webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/
webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/fault.xml
- copied, changed from r1682663,
webservices/axiom/trunk/axiom-api/src/test/resources/soap/soap12/message.xml
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SampleBasedSOAPTestCase.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/fault/TestGetNodeWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultcode/TestGetSubCodeWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeNestedWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueAsQNameWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueNestedWithParser.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueWithParser.java
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SampleBasedSOAPTestCase.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SampleBasedSOAPTestCase.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SampleBasedSOAPTestCase.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SampleBasedSOAPTestCase.java
Sun May 31 10:41:55 2015
@@ -18,8 +18,6 @@
*/
package org.apache.axiom.ts.soap;
-import static org.apache.axiom.truth.AxiomTestVerb.ASSERT;
-
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.soap.SOAPEnvelope;
@@ -32,9 +30,8 @@ public abstract class SampleBasedSOAPTes
sample = sampleSet.getMessage(spec);
}
- public SampleBasedSOAPTestCase(OMMetaFactory metaFactory, SOAPSpec spec,
SOAPSample sample) {
- super(metaFactory, spec);
- ASSERT.that(sample.getSOAPSpec()).isSameAs(spec);
+ public SampleBasedSOAPTestCase(OMMetaFactory metaFactory, SOAPSample
sample) {
+ super(metaFactory, sample.getSOAPSpec());
this.sample = sample;
}
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/fault/TestGetNodeWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/fault/TestGetNodeWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/fault/TestGetNodeWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/fault/TestGetNodeWithParser.java
Sun May 31 10:41:55 2015
@@ -20,17 +20,18 @@ package org.apache.axiom.ts.soap12.fault
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFault;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetNodeWithParser extends SOAPTestCase {
+public class TestGetNodeWithParser extends SampleBasedSOAPTestCase {
public TestGetNodeWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFault soapFaultWithParser =
getTestMessage(MESSAGE).getBody().getFault();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFault soapFaultWithParser = envelope.getBody().getFault();
assertNotNull(
"SOAP 1.2 Fault Test with parser: - getNode method returns
null",
soapFaultWithParser.getNode());
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultcode/TestGetSubCodeWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultcode/TestGetSubCodeWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultcode/TestGetSubCodeWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultcode/TestGetSubCodeWithParser.java
Sun May 31 10:41:55 2015
@@ -20,17 +20,18 @@ package org.apache.axiom.ts.soap12.fault
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetSubCodeWithParser extends SOAPTestCase {
+public class TestGetSubCodeWithParser extends SampleBasedSOAPTestCase {
public TestGetSubCodeWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultCode faultCode =
getTestMessage(MESSAGE).getBody().getFault().getCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultCode faultCode = envelope.getBody().getFault().getCode();
assertNotNull(
"SOAP 1.2 Fault Code Test with parser :- getSubCode method
returns null",
faultCode.getSubCode());
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeNestedWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeNestedWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeNestedWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeNestedWithParser.java
Sun May 31 10:41:55 2015
@@ -20,17 +20,18 @@ package org.apache.axiom.ts.soap12.fault
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultSubCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetSubCodeNestedWithParser extends SOAPTestCase {
+public class TestGetSubCodeNestedWithParser extends SampleBasedSOAPTestCase {
public TestGetSubCodeNestedWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultSubCode subCode =
getTestMessage(MESSAGE).getBody().getFault().getCode().getSubCode().getSubCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultSubCode subCode =
envelope.getBody().getFault().getCode().getSubCode().getSubCode();
assertNotNull(
"SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser :
- getSubCode method returns null",
subCode.getSubCode());
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetSubCodeWithParser.java
Sun May 31 10:41:55 2015
@@ -20,17 +20,18 @@ package org.apache.axiom.ts.soap12.fault
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultSubCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetSubCodeWithParser extends SOAPTestCase {
+public class TestGetSubCodeWithParser extends SampleBasedSOAPTestCase {
public TestGetSubCodeWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultSubCode subCode =
getTestMessage(MESSAGE).getBody().getFault().getCode().getSubCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultSubCode subCode =
envelope.getBody().getFault().getCode().getSubCode();
assertNotNull(
"SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : -
getSubCode method returns null",
subCode.getSubCode());
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueAsQNameWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueAsQNameWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueAsQNameWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueAsQNameWithParser.java
Sun May 31 10:41:55 2015
@@ -21,21 +21,22 @@ package org.apache.axiom.ts.soap12.fault
import javax.xml.namespace.QName;
import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultClassifier;
import org.apache.axiom.soap.SOAPFaultSubCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
/**
* Tests the behavior of {@link SOAPFaultClassifier#getValueAsQName()} on a
{@link SOAPFaultSubCode}.
*/
-public class TestGetValueAsQNameWithParser extends SOAPTestCase {
+public class TestGetValueAsQNameWithParser extends SampleBasedSOAPTestCase {
public TestGetValueAsQNameWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultSubCode subCode =
getTestMessage(MESSAGE).getBody().getFault().getCode().getSubCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultSubCode subCode =
envelope.getBody().getFault().getCode().getSubCode();
assertEquals(new QName("http:www.sample.org",
"MessageTimeout_In_First_Subcode"), subCode.getValueAsQName());
}
}
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueNestedWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueNestedWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueNestedWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueNestedWithParser.java
Sun May 31 10:41:55 2015
@@ -19,17 +19,18 @@
package org.apache.axiom.ts.soap12.faultsubcode;
import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultSubCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetValueNestedWithParser extends SOAPTestCase {
+public class TestGetValueNestedWithParser extends SampleBasedSOAPTestCase {
public TestGetValueNestedWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultSubCode subCode =
getTestMessage(MESSAGE).getBody().getFault().getCode().getSubCode().getSubCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultSubCode subCode =
envelope.getBody().getFault().getCode().getSubCode().getSubCode();
assertNotNull(
"SOAP 1.2 SOAPFaultSubCode Test In FaultSubCode With Parser :
- getValue method returns null",
subCode.getValue());
Modified:
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueWithParser.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueWithParser.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueWithParser.java
(original)
+++
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/faultsubcode/TestGetValueWithParser.java
Sun May 31 10:41:55 2015
@@ -19,17 +19,18 @@
package org.apache.axiom.ts.soap12.faultsubcode;
import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFaultSubCode;
-import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.SOAPSample;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
-public class TestGetValueWithParser extends SOAPTestCase {
+public class TestGetValueWithParser extends SampleBasedSOAPTestCase {
public TestGetValueWithParser(OMMetaFactory metaFactory) {
- super(metaFactory, SOAPSpec.SOAP12);
+ super(metaFactory, SOAPSample.SOAP12_FAULT);
}
- protected void runTest() throws Throwable {
- SOAPFaultSubCode subCode =
getTestMessage(MESSAGE).getBody().getFault().getCode().getSubCode();
+ protected void runTest(SOAPEnvelope envelope) throws Throwable {
+ SOAPFaultSubCode subCode =
envelope.getBody().getFault().getCode().getSubCode();
assertNotNull(
"SOAP 1.2 SOAPFaultSubCode Test In FaultCode With Parser : -
getValue method returns null",
subCode.getValue());
Modified:
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java?rev=1682712&r1=1682711&r2=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
(original)
+++
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSample.java
Sun May 31 10:41:55 2015
@@ -40,6 +40,11 @@ import org.xml.sax.InputSource;
* A SOAP test message.
*/
public class SOAPSample extends XMLSample {
+ /**
+ * A SOAP fault response that uses some SOAP 1.2 specific features.
+ */
+ public static final SOAPSample SOAP12_FAULT = new
SimpleSOAPSample(SOAPSpec.SOAP12, "test-message/soap12/fault.xml",
"soap12/fault.xml");
+
private final SOAPSpec spec;
SOAPSample(SOAPSpec spec, MessageContent content, String name) {
Copied:
webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/fault.xml
(from r1682663,
webservices/axiom/trunk/axiom-api/src/test/resources/soap/soap12/message.xml)
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/fault.xml?p2=webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/fault.xml&p1=webservices/axiom/trunk/axiom-api/src/test/resources/soap/soap12/message.xml&r1=1682663&r2=1682712&rev=1682712&view=diff
==============================================================================
---
webservices/axiom/trunk/axiom-api/src/test/resources/soap/soap12/message.xml
(original)
+++
webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/soap12/fault.xml
Sun May 31 10:41:55 2015
@@ -1,43 +1,4 @@
-<!--
- ~ 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.
- -->
-
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
- <env:Header>
- <test:echoOk xmlns:test="http://example.org/ts-tests"
-
env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
- env:mustUnderstand="true" env:relay="false"
- env:anyAttribute="any value">
- foo
- </test:echoOk>
- <test1:echoOk1 xmlns:test1="http://example1.org/ts-tests"
- env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
- env:mustUnderstand="false" env:relay="true"
- env:anyAttribute="any value">
- foo
- </test1:echoOk1>
- <test2:echoOk2 xmlns:test2="http://example2.org/ts-tests"
-
env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
- env:mustUnderstand="1"
- env:anyAttribute="any value">
- foo
- </test2:echoOk2>
- </env:Header>
<env:Body>
<env:Fault xmlns:m="http:www.sample.org">
<env:Code>