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 2015/05/17 22:41:33 UTC
svn commit: r1679896 - in /webservices/axiom/trunk:
modules/axiom-api/src/test/java/org/apache/axiom/attachments/
modules/axiom-api/src/test/java/org/apache/axiom/om/
testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/
testing/soap-testsu...
Author: veithen
Date: Sun May 17 20:41:33 2015
New Revision: 1679896
URL: http://svn.apache.org/r1679896
Log:
Make a distinction between MTOM and SwA samples.
Added:
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMESample.java
- copied, changed from r1679895, webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMEResource.java
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java (with props)
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java (with props)
Removed:
webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMEResource.java
Modified:
webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/TestSerialize.java
Modified: webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java?rev=1679896&r1=1679895&r2=1679896&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java Sun May 17 20:41:33 2015
@@ -51,7 +51,7 @@ import org.apache.axiom.om.impl.MTOMCons
import org.apache.axiom.testutils.activation.RandomDataSource;
import org.apache.axiom.testutils.io.ExceptionInputStream;
import org.apache.axiom.testutils.io.IOTestUtils;
-import org.apache.axiom.ts.soap.MIMEResource;
+import org.apache.axiom.ts.soap.MIMESample;
import org.apache.axiom.util.UIDGenerator;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.NullOutputStream;
@@ -665,7 +665,7 @@ public class AttachmentsTest extends Abs
testTurkishLocale("content-id");
}
- private void testGetAttachmentSpecType(MIMEResource resource, String expectedResult) throws Exception {
+ private void testGetAttachmentSpecType(MIMESample resource, String expectedResult) throws Exception {
InputStream in = resource.getInputStream();
try {
Attachments attachments = new Attachments(in, resource.getContentType());
Modified: webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java?rev=1679896&r1=1679895&r2=1679896&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java Sun May 17 20:41:33 2015
@@ -19,7 +19,8 @@
package org.apache.axiom.om;
-import org.apache.axiom.ts.soap.MIMEResource;
+import org.apache.axiom.ts.soap.MTOMSample;
+import org.apache.axiom.ts.soap.SwASample;
/** All the various files created 03-Nov-2005 12:02:12 */
@@ -31,7 +32,7 @@ public class TestConstants {
public static final String REALLY_BIG_MESSAGE = "soap/soap11/reallyReallyBigMessage.xml";
public static final String EMPTY_BODY_MESSAGE = "soap/soap11/emtyBodymessage.xml";
- public static final MIMEResource MTOM_MESSAGE = new MIMEResource("mtom/MTOMAttachmentStream.bin",
+ public static final MTOMSample MTOM_MESSAGE = new MTOMSample("mtom/MTOMAttachmentStream.bin",
"multipart/related; " +
"boundary=\"MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701\"; " +
"type=\"application/xop+xml\"; " +
@@ -43,11 +44,11 @@ public class TestConstants {
public static final String MTOM_MESSAGE_IMAGE1 = "mtom/img/test.jpg";
public static final String MTOM_MESSAGE_IMAGE2 = "mtom/img/test2.jpg";
- public static final MIMEResource MTOM_MESSAGE_2 = new MIMEResource("mtom/MTOMBuilderTestIn.txt",
+ public static final MTOMSample MTOM_MESSAGE_2 = new MTOMSample("mtom/MTOMBuilderTestIn.txt",
"multipart/Related; charset=\"UTF-8\"; type=\"application/xop+xml\"; " +
"boundary=\"----=_AxIs2_Def_boundary_=42214532\"; start=\"SOAPPart\"");
- public static final MIMEResource SWA_MESSAGE = new MIMEResource(
+ public static final SwASample SWA_MESSAGE = new SwASample(
"soap/soap11/SWAAttachmentStream.txt",
"multipart/related; " +
"boundary=\"MIMEBoundaryurn:uuid:A3ADBAEE51A1A87B2A11443668160701\"; " +
Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/TestSerialize.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/TestSerialize.java?rev=1679896&r1=1679895&r2=1679896&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/TestSerialize.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/xop/TestSerialize.java Sun May 17 20:41:33 2015
@@ -31,7 +31,7 @@ import org.apache.axiom.om.TestConstants
import org.apache.axiom.om.impl.MTOMXMLStreamWriter;
import org.apache.axiom.om.util.StAXParserConfiguration;
import org.apache.axiom.ts.AxiomTestCase;
-import org.apache.axiom.ts.soap.MIMEResource;
+import org.apache.axiom.ts.soap.MTOMSample;
public class TestSerialize extends AxiomTestCase {
private final boolean base64;
@@ -43,7 +43,7 @@ public class TestSerialize extends Axiom
}
protected void runTest() throws Throwable {
- MIMEResource testMessage = TestConstants.MTOM_MESSAGE;
+ MTOMSample testMessage = TestConstants.MTOM_MESSAGE;
// Read in message: SOAPPart and 2 image attachments
InputStream inStream = testMessage.getInputStream();
Copied: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMESample.java (from r1679895, webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMEResource.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMESample.java?p2=webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMESample.java&p1=webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMEResource.java&r1=1679895&r2=1679896&rev=1679896&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMEResource.java (original)
+++ webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MIMESample.java Sun May 17 20:41:33 2015
@@ -23,11 +23,11 @@ import java.io.InputStream;
import javax.mail.internet.ContentType;
import javax.mail.internet.ParseException;
-public class MIMEResource {
+public abstract class MIMESample {
private final String name;
private final String contentType;
- public MIMEResource(String name, String contentType) {
+ MIMESample(String name, String contentType) {
this.name = name;
this.contentType = contentType;
}
@@ -38,7 +38,7 @@ public class MIMEResource {
* @return an input stream with the content of this message
*/
public InputStream getInputStream() {
- return MIMEResource.class.getClassLoader().getResourceAsStream(name);
+ return MIMESample.class.getClassLoader().getResourceAsStream(name);
}
public String getContentType() {
Added: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java?rev=1679896&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java (added)
+++ webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java Sun May 17 20:41:33 2015
@@ -0,0 +1,25 @@
+/*
+ * 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;
+
+public class MTOMSample extends MIMESample {
+ public MTOMSample(String name, String contentType) {
+ super(name, contentType);
+ }
+}
Propchange: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/MTOMSample.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java?rev=1679896&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java (added)
+++ webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java Sun May 17 20:41:33 2015
@@ -0,0 +1,25 @@
+/*
+ * 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;
+
+public class SwASample extends MIMESample {
+ public SwASample(String name, String contentType) {
+ super(name, contentType);
+ }
+}
Propchange: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SwASample.java
------------------------------------------------------------------------------
svn:eol-style = native