JBossWS SVN: r18774 - in stack/cxf/trunk/modules/testsuite/cxf-tests: scripts and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-03 06:05:50 -0400 (Thu, 03 Jul 2014)
New Revision: 18774
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/asyncclient/AsyncClientTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/JBWS3593TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/JBWS3679TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/servletCtx/ServletCtxTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java
Log:
[JBWS-3711] Conversion to ShrinkWrap of remaining cxf non-sample tests...
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2014-07-03 10:05:50 UTC (rev 18774)
@@ -81,7 +81,6 @@
<target>
<property name="tests.output.dir" value="${project.build.directory}"/>
<property name="tests.resources.dir" value="${basedir}/src/test/resources"/>
- <ant antfile="scripts/cxf-jars-jaxws.xml" target="build-jars-jaxws"/>
<ant antfile="scripts/cxf-samples-jars-jaxws.xml" target="build-jars-jaxws"/>
</target>
</configuration>
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2014-07-03 10:05:50 UTC (rev 18774)
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2014, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ This is free software; you can redistribute it and/or modify it
- ~ under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ This software is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public
- ~ License along with this software; if not, write to the Free
- ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
-
-<project>
-
- <description>JBossWS test archive builder</description>
-
- <target name="build-jars-jaxws" description="Build the deployments.">
-
- <mkdir dir="${tests.output.dir}/test-libs"/>
-
- <!-- jaxws-cxf-asyncclient -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-asyncclient.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/asyncclient/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/asyncclient/EndpointImpl*.class"/>
- </classes>
- <manifest>
- <attribute name="Dependencies" value="org.apache.cxf"/>
- </manifest>
- </war>
-
- <!-- jaxws-cxf-embedded-fail -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-embedded-fail.war"
- webxml="${tests.output.dir}/test-resources/jaxws/cxf/noIntegration/embedded/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/noIntegration/EchoImpl.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/noIntegration/embedded/WEB-INF">
- <include name="beans.xml"/>
- </webinf>
- <zipfileset
- dir="${tests.output.dir}/spring/"
- prefix="WEB-INF/lib/"/>
- <zipfileset
- dir="${tests.output.dir}/cxf-embedded/"
- prefix="WEB-INF/lib/"/>
- <manifest>
- <attribute name="Dependencies" value="javax.wsdl4j.api,org.apache.ws.xmlschema,org.apache.neethi,org.codehaus.woodstox"/>
- </manifest>
- </war>
-
- <!-- jaxws-cxf-jbws3516 -->
- <war
- warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3516.war"
- webxml="${tests.output.dir}/test-resources/jaxws/cxf/jbws3516/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/jbws3516/*.class"/>
- <exclude name="org/jboss/test/ws/jaxws/cxf/jbws3516/*TestCase.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3516/WEB-INF">
- <include name="wsdl/**" />
- </webinf>
-<!-- <zipfileset
- dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3516/WEB-INF/wsdl"
- prefix="WEB-INF/wsdl"/> -->
- <manifest>
- <attribute name="Dependencies" value="org.apache.cxf.impl"/>
- </manifest>
- </war>
-
- <!-- jaxws-cxf-jbws3593 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3593.war" needxmlfile='false'>
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/jbws3593/EndpointBean.class" />
- <include name="org/jboss/test/ws/jaxws/cxf/jbws3593/MTOMOutInterceptor.class" />
- </classes>
- <manifest>
- <attribute name="Dependencies" value="org.apache.cxf"/>
- </manifest>
- </war>
-
- <!-- jaxws-cxf-jbws3679 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3679.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/jbws3679/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/jbws3679/*.class"/>
- <exclude name="org/jboss/test/ws/jaxws/cxf/jbws3679/*TestCase.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3679/WEB-INF">
- <include name="beans.xml"/>
- </webinf>
- </war>
-
- <!-- jaxws-cxf-servletCtx -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-servletCtx.war" needxmlfile='false'>
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/cxf/servletCtx/EndpointOneImpl.class"/>
- <include name="org/jboss/test/ws/jaxws/cxf/servletCtx/EndpointOne.class"/>
- </classes>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.logging"/>
- </manifest>
- </war>
-
- <!-- saaj-soap-connection -->
- <war
- warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
- webxml="${tests.output.dir}/test-resources/saaj/jbws3084/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/saaj/jbws3084/ServiceImpl.class"/>
- <include name="org/jboss/test/ws/saaj/jbws3084/ServiceIface.class"/>
- <include name="org/jboss/test/ws/saaj/jbws3084/InputStreamDataSource.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/saaj/jbws3084/WEB-INF">
- <include name="wsdl/**" />
- </webinf>
- <!--<zipfileset
- dir="${tests.output.dir}/test-resources/saaj/jbws3084/WEB-INF/wsdl"
- prefix="WEB-INF/wsdl"/>-->
- </war>
-
- <!-- Please add alphabetically -->
-
- </target>
-
-</project>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/asyncclient/AsyncClientTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/asyncclient/AsyncClientTestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/asyncclient/AsyncClientTestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.cxf.asyncclient;
+import java.io.File;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -30,8 +33,11 @@
import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* @author <a href="mailto:ema@redhat.com">Jim Ma</a>
@@ -39,11 +45,24 @@
*/
public class AsyncClientTestCase extends JBossWSTest
{
- private String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-asyncclient";
+ private final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-asyncclient";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-asyncclient.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.asyncclient.EndpointImpl.class)
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/asyncclient/WEB-INF/web.xml"));
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(AsyncClientTestCase.class, "jaxws-cxf-asyncclient.war");
+ return new JBossWSCXFTestSetup(AsyncClientTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testAsycClienWithHCAddress() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.cxf.jbws3516;
+import java.io.File;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -35,17 +38,41 @@
import org.apache.cxf.ws.addressing.AttributedURIType;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.Filter;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
public class JBWS3516TestCase extends JBossWSTest
{
public final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/helloworld";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3516.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf.impl\n"))
+ .addPackages(false, new Filter<ArchivePath>() {
+ @Override
+ public boolean include(ArchivePath object)
+ {
+ return !object.get().contains("TestCase");
+ }}, "org.jboss.test.ws.jaxws.cxf.jbws3516")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl"), "wsdl/hello_world.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3516/WEB-INF/web.xml"));
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS3516TestCase.class, "jaxws-cxf-jbws3516.war");
+ return new JBossWSTestSetup(JBWS3516TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testOneWayFaultTo() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/JBWS3593TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/JBWS3593TestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3593/JBWS3593TestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -39,7 +39,10 @@
import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -51,9 +54,22 @@
{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3593/EndpointBean";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3593.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3593.EndpointBean.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3593.MTOMOutInterceptor.class);
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS3593TestCase.class, "jaxws-cxf-jbws3593.war");
+ return new JBossWSTestSetup(JBWS3593TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testMTOMAccess() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/JBWS3679TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/JBWS3679TestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/JBWS3679TestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -16,21 +16,43 @@
*/
package org.jboss.test.ws.jaxws.cxf.jbws3679;
+import java.io.File;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
import junit.framework.Test;
import org.jboss.ws.common.IOUtils;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
public class JBWS3679TestCase extends JBossWSTest
{
public final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3679/ServletClient";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-jbws3679.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3679.CDIBeanClient.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3679.EndpointOne.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3679.EndpointOneImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3679.EndpointOneService.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3679.ServletClient.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3679/WEB-INF/beans.xml"), "beans.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3679/WEB-INF/web.xml"));
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS3679TestCase.class, "jaxws-cxf-jbws3679.war");
+ return new JBossWSTestSetup(JBWS3679TestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testServletClient() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/AS7537TestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -64,7 +64,7 @@
.addAsLibrary(new File(embeddedCXFDir, "cxf-rt-databinding-jaxb-2.6.6.jar"))
.addAsLibrary(new File(embeddedCXFDir, "cxf-rt-frontend-jaxws-2.6.6.jar"))
.addAsLibrary(new File(embeddedCXFDir, "cxf-rt-frontend-simple-2.6.6.jar"))
- .addAsLibrary(new File(embeddedCXFDir, "cxf-rt-frontend-http-2.6.6.jar"))
+ .addAsLibrary(new File(embeddedCXFDir, "cxf-rt-transports-http-2.6.6.jar"))
.addAsLibrary(new File(embeddedCXFDir, "cxf-rt-ws-policy-2.6.6.jar"));
}
});
@@ -73,8 +73,9 @@
public void testFailureWithoutJBossDeploymentStructure() throws Exception {
boolean undeploy = true;
+ final String deploymentName = JBossWSTestHelper.writeToFile(createDeployments());
try {
- JBossWSTestHelper.deploy("jaxws-cxf-embedded-fail.war");
+ JBossWSTestHelper.deploy(deploymentName);
fail("Deployment failure expected");
} catch (Exception e) {
undeploy = false;
@@ -82,7 +83,7 @@
} finally {
if (undeploy) {
try {
- JBossWSTestHelper.undeploy("jaxws-cxf-embedded-fail.war");
+ JBossWSTestHelper.undeploy(deploymentName);
} catch (Exception e) {
//ignore
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/servletCtx/ServletCtxTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/servletCtx/ServletCtxTestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/servletCtx/ServletCtxTestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -24,6 +24,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
@@ -35,8 +36,11 @@
import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
*
@@ -47,9 +51,22 @@
{
private String endpointOneURL = "http://" + getServerHost() + ":8080/jaxws-cxf-servletCtx/ServiceOne";
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-servletCtx.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.logging\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.servletCtx.EndpointOne.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.servletCtx.EndpointOneImpl.class);
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(ServletCtxTestCase.class, "jaxws-cxf-servletCtx.war");
+ return new JBossWSCXFTestSetup(ServletCtxTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
private String targetNS = "http://org.jboss.ws.jaxws.cxf/servletCtx";
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084CxfTestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.saaj.jbws3084;
+import java.io.File;
import java.net.URL;
import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
@@ -35,6 +38,8 @@
import org.jboss.wsf.test.JBossWSCXFTestSetup;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
/**
* [JBWS-3084] Enable control of chunked encoding when using SOAPConnection.
@@ -43,14 +48,29 @@
*/
public class JBWS3084CxfTestCase extends JBossWSTest
{
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("cxf-saaj-soap-connection.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.saaj.jbws3084.InputStreamDataSource.class)
+ .addClass(org.jboss.test.ws.saaj.jbws3084.ServiceIface.class)
+ .addClass(org.jboss.test.ws.saaj.jbws3084.ServiceImpl.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/saaj/jbws3084/WEB-INF/wsdl/SaajService.wsdl"), "wsdl/SaajService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/saaj/jbws3084/WEB-INF/web.xml"));
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JBWS3084CxfTestCase.class, "saaj-soap-connection.war");
+ return new JBossWSCXFTestSetup(JBWS3084CxfTestCase.class, JBossWSTestHelper.writeToFile(createDeployments()));
}
public void testSoapConnectionGet() throws Exception
{
- final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection/greetMe";
+ final String serviceURL = "http://" + getServerHost() + ":8080/cxf-saaj-soap-connection/greetMe";
SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
SOAPConnection con = conFac.createConnection();
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java 2014-06-30 18:53:54 UTC (rev 18773)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java 2014-07-03 10:05:50 UTC (rev 18774)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.saaj.jbws3084;
-
-import java.net.URL;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConnection;
-import javax.xml.soap.SOAPConnectionFactory;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPMessage;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * [JBWS-3084] Enable control of chunked encoding when using SOAPConnection.
- *
- * @author sberyozk(a)redhat.com
- */
-public class JBWS3084TestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JBWS3084TestCase.class, "saaj-soap-connection.war");
- }
-
- public void testSoapConnectionGet() throws Exception
- {
- final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection/greetMe";
- SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
-
- SOAPConnection con = conFac.createConnection();
- URL endpoint = new URL(serviceURL);
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPMessage msg = msgFactory.createMessage();
- msg.getSOAPBody().addBodyElement(new QName("http://www.jboss.org/jbossws/saaj", "greetMe"));
- SOAPMessage response = con.call(msg, endpoint);
- QName greetMeResp = new QName("http://www.jboss.org/jbossws/saaj", "greetMeResponse");
-
- Iterator<?> sayHiRespIterator = response.getSOAPBody().getChildElements(greetMeResp);
- SOAPElement soapElement = (SOAPElement) sayHiRespIterator.next();
- assertNotNull(soapElement);
-
- assertEquals(1, response.countAttachments());
- }
-}
10 years, 5 months