JBossWS SVN: r16115 - container/jboss70/branches/jbossws-jboss702.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 10:30:53 -0400 (Fri, 06 Apr 2012)
New Revision: 16115
Modified:
container/jboss70/branches/jbossws-jboss702/pom.xml
Log:
[JBWS-3483] Adding proper transitive dependencies
Modified: container/jboss70/branches/jbossws-jboss702/pom.xml
===================================================================
--- container/jboss70/branches/jbossws-jboss702/pom.xml 2012-04-06 12:36:13 UTC (rev 16114)
+++ container/jboss70/branches/jbossws-jboss702/pom.xml 2012-04-06 14:30:53 UTC (rev 16115)
@@ -81,6 +81,24 @@
<version>${jboss.version}</version>
<scope>provided</scope>
</dependency>
+
+ <!-- AS specific transitive dependencies for JBossWS testsuite execution -->
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-controller-client</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.marshalling</groupId>
+ <artifactId>jboss-marshalling-river</artifactId>
+ <version>1.3.0.GA</version>
+ </dependency>
+
</dependencies>
<!-- plugins -->
12 years, 9 months
JBossWS SVN: r16114 - container/jboss70/branches/jbossws-jboss702.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 08:36:13 -0400 (Fri, 06 Apr 2012)
New Revision: 16114
Modified:
container/jboss70/branches/jbossws-jboss702/pom.xml
Log:
Moving to build 4.1.0-SNAPSHOT
Modified: container/jboss70/branches/jbossws-jboss702/pom.xml
===================================================================
--- container/jboss70/branches/jbossws-jboss702/pom.xml 2012-04-06 11:06:24 UTC (rev 16113)
+++ container/jboss70/branches/jbossws-jboss702/pom.xml 2012-04-06 12:36:13 UTC (rev 16114)
@@ -7,7 +7,7 @@
<artifactId>jbossws-jboss702</artifactId>
<description>JBossWS Container integration for JBoss AS 7.0.2.Final</description>
- <version>4.0.2-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -25,9 +25,9 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.1-SNAPSHOT</jbossws.api.version>
- <jbossws.spi.version>2.0.2-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.0.2-SNAPSHOT</jbossws.common.version>
+ <jbossws.api.version>1.0.0.GA</jbossws.api.version>
+ <jbossws.spi.version>2.1.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.1.0-SNAPSHOT</jbossws.common.version>
<jboss.msc.version>1.0.1.GA</jboss.msc.version>
<jboss.version>7.0.2.Final</jboss.version>
</properties>
12 years, 9 months
JBossWS SVN: r16113 - shared-testsuite/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 07:06:24 -0400 (Fri, 06 Apr 2012)
New Revision: 16113
Removed:
shared-testsuite/branches/concurrent/
Log:
Removing branch not required anymore
12 years, 9 months
JBossWS SVN: r16112 - in shared-testsuite/trunk: testsuite/src/test/ant-import and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 07:04:53 -0400 (Fri, 06 Apr 2012)
New Revision: 16112
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml
Removed:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl
Log:
[JBWS-3482] svn merge -r 16106:16111 https://svn.jboss.org/repos/jbossws/shared-testsuite/branches/concurrent .
* Minor refactoring to a bunch of tests to avoid duplication in context roots of endpoints belonging to different archives deployed by different tests
* Simple semaphore solution in AppclientHelper for serializing applclient test executions
* Reduce logging of 2934 testcases
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -33,6 +33,7 @@
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.Semaphore;
import org.jboss.ws.common.concurrent.CopyJob;
import org.jboss.ws.common.io.TeeOutputStream;
@@ -48,7 +49,8 @@
private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS + "appclient" + EXT;
- private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>();
+ private static final Semaphore s = new Semaphore(1, true); //one appclient only can be running at the same time ATM
+ private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>(1);
private static ExecutorService es = Executors.newCachedThreadPool();
private static String appclientOutputDir;
@@ -89,6 +91,7 @@
}
finally
{
+ s.release();
ap.outTask.kill();
ap.errTask.kill();
ap.process.destroy();
@@ -96,47 +99,53 @@
}
}
- private static AppclientProcess newAppclientProcess(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws IOException
+ private static AppclientProcess newAppclientProcess(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws Exception
{
- final String killFileName = getKillFileName(archive);
- final String appclientFullName = getAppclientFullName(archive);
- final String appclientShortName = getAppclientShortName(archive);
- final AppclientProcess ap = new AppclientProcess();
- ap.output = new ByteArrayOutputStream();
- final List<String> args = new LinkedList<String>();
- args.add(appclientScript);
- args.add("--appclient-config=appclient-ws.xml");
- args.add(appclientFullName);
- if (appclientOS == null)
- {
- args.add(killFileName);
- }
- else
- {
- // propagate appclient args
- for (final String appclientArg : appclientArgs)
+ s.acquire();
+ try {
+ final String killFileName = getKillFileName(archive);
+ final String appclientFullName = getAppclientFullName(archive);
+ final String appclientShortName = getAppclientShortName(archive);
+ final AppclientProcess ap = new AppclientProcess();
+ ap.output = new ByteArrayOutputStream();
+ final List<String> args = new LinkedList<String>();
+ args.add(appclientScript);
+ args.add("--appclient-config=appclient-ws.xml");
+ args.add(appclientFullName);
+ if (appclientOS == null)
{
- args.add(appclientArg);
+ args.add(killFileName);
}
+ else
+ {
+ // propagate appclient args
+ for (final String appclientArg : appclientArgs)
+ {
+ args.add(appclientArg);
+ }
+ }
+ final ProcessBuilder pb = new ProcessBuilder().command(args);
+ // always propagate IPv6 related properties
+ final StringBuilder javaOptsValue = new StringBuilder();
+ javaOptsValue.append("\"-Djboss.bind.address=").append(undoIPv6Brackets(System.getProperty("jboss.bind.address", "localhost"))).append("\" ");
+ javaOptsValue.append("\"-Djava.net.preferIPv4Stack=").append(System.getProperty("java.net.preferIPv4Stack", "true")).append("\" ");
+ javaOptsValue.append("\"-Djava.net.preferIPv6Addresses=").append(System.getProperty("java.net.preferIPv6Addresses", "false")).append("\" ");
+ pb.environment().put("JAVA_OPTS", javaOptsValue.toString());
+ ap.process = pb.start();
+ ap.log = new FileOutputStream(new File(getAppclientOutputDir(), appclientShortName + ".log-" + System.currentTimeMillis()));
+ // appclient out
+ ap.outTask = new CopyJob(ap.process.getInputStream(),
+ appclientOS == null ? new TeeOutputStream(ap.output, ap.log) : new TeeOutputStream(ap.output, ap.log, appclientOS));
+ // appclient err
+ ap.errTask = new CopyJob(ap.process.getErrorStream(), ap.log);
+ // unfortunately the following threads are needed because of Windows behavior
+ es.submit(ap.outTask);
+ es.submit(ap.errTask);
+ return ap;
+ } catch (Exception e) {
+ s.release();
+ throw e;
}
- final ProcessBuilder pb = new ProcessBuilder().command(args);
- // always propagate IPv6 related properties
- final StringBuilder javaOptsValue = new StringBuilder();
- javaOptsValue.append("\"-Djboss.bind.address=").append(undoIPv6Brackets(System.getProperty("jboss.bind.address", "localhost"))).append("\" ");
- javaOptsValue.append("\"-Djava.net.preferIPv4Stack=").append(System.getProperty("java.net.preferIPv4Stack", "true")).append("\" ");
- javaOptsValue.append("\"-Djava.net.preferIPv6Addresses=").append(System.getProperty("java.net.preferIPv6Addresses", "false")).append("\" ");
- pb.environment().put("JAVA_OPTS", javaOptsValue.toString());
- ap.process = pb.start();
- ap.log = new FileOutputStream(new File(getAppclientOutputDir(), appclientShortName + ".log-" + System.currentTimeMillis()));
- // appclient out
- ap.outTask = new CopyJob(ap.process.getInputStream(),
- appclientOS == null ? new TeeOutputStream(ap.output, ap.log) : new TeeOutputStream(ap.output, ap.log, appclientOS));
- // appclient err
- ap.errTask = new CopyJob(ap.process.getErrorStream(), ap.log);
- // unfortunately the following threads are needed because of Windows behavior
- es.submit(ap.outTask);
- es.submit(ap.errTask);
- return ap;
}
private static String undoIPv6Brackets(final String s)
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -283,7 +283,7 @@
{
JBossWSTestHelper.undeployAppclient(archive, true);
}
- else
+ else if (!archive.endsWith("-client.jar"))
{
JBossWSTestHelper.undeploy(archive);
}
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-06 11:04:53 UTC (rev 16112)
@@ -898,7 +898,7 @@
</war>
<!-- jaxws-jbws2934 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
<exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.class" />
@@ -906,7 +906,7 @@
</classes>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2934.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2934-ejb.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
<exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.class" />
@@ -1207,7 +1207,7 @@
<include name="org/jboss/test/ws/jaxws/jbws3367/EndpointIface.class"/>
<include name="org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.class"/>
</classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF">
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF-2">
<include name="jboss-web.xml" />
</webinf>
</war>
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-04-06 11:04:53 UTC (rev 16112)
@@ -53,7 +53,7 @@
</war>
<!-- jaxws-samples-context -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-samples-context.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/context/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-context-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/context/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/context/EndpointJSE.class"/>
</classes>
@@ -109,7 +109,7 @@
</jar>
<!-- jaxws-samples-exception -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-samples-exception.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/exception/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-exception-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/exception/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws/**"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.class"/>
Deleted: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws1581;
-
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * EJB vehicle using loader repository not sufficiently isolated
- *
- * http://jira.jboss.org/jira/browse/JBWS-1581
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Mar-2007
- */
-public class JBWS1581EarTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1581EarTestCase.class, "jaxws-jbws1581.ear, jaxws-jbws1581-ejb3.jar");
- }
-
- public void testWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
- Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
- assertNotNull("wsdl expected", wsdl);
- }
-
- public void testEJBVehicle() throws Exception
- {
- InitialContext iniCtx = null;
- try
- {
- iniCtx = getServerInitialContext();
- EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
- }
- finally
- {
- if (iniCtx != null)
- {
- iniCtx.close();
- }
- }
- }
-}
Copied: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java (from rev 16111, shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java)
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.jaxws.jbws1581;
+
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * EJB vehicle using loader repository not sufficiently isolated
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1581
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 19-Mar-2007
+ */
+public class JBWS1581TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1581TestCase.class, "jaxws-jbws1581-ejb3.jar");
+ }
+
+ public void testWSDLAccessWar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581-pojo.war");
+ internalTestWSDLAccess();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581-pojo.war");
+ }
+ }
+
+ public void testEJBVehicleWar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581-pojo.war");
+ internalTestEJBVehicle();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581-pojo.war");
+ }
+ }
+
+ public void testWSDLAccessEar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581.ear");
+ internalTestWSDLAccess();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581.ear");
+ }
+ }
+
+ public void testEJBVehicleEar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581.ear");
+ internalTestEJBVehicle();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581.ear");
+ }
+ }
+
+ private void internalTestWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
+ Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
+ assertNotNull("wsdl expected", wsdl);
+ }
+
+ private void internalTestEJBVehicle() throws Exception
+ {
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
+ String retStr = remote.runTest("Hello World!");
+ assertEquals("Hello World!", retStr);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
+ }
+}
Deleted: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws1581;
-
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * EJB vehicle using loader repository not sufficiently isolated
- *
- * http://jira.jboss.org/jira/browse/JBWS-1581
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Mar-2007
- */
-public class JBWS1581WarTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1581WarTestCase.class, "jaxws-jbws1581-pojo.war, jaxws-jbws1581-ejb3.jar");
- }
-
- public void testWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
- Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
- assertNotNull("wsdl expected", wsdl);
- }
-
- public void testEJBVehicle() throws Exception
- {
- InitialContext iniCtx = null;
- try
- {
- iniCtx = getServerInitialContext();
- EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
- }
- finally
- {
- if (iniCtx != null)
- {
- iniCtx.close();
- }
- }
- }
-}
Deleted: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,196 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws2150;
-
-import java.net.URL;
-
-import javax.management.Attribute;
-import javax.management.ObjectName;
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import org.jboss.ws.common.ObjectNameFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
-
-/**
- * [JBWS-2150] Migrate AddressRewritingTestCase to jaxws
- * @author richard.opalka(a)jboss.com
- */
-public final class JBWS2150TestCase extends JBossWSTest
-{
- private static final ObjectName SERVER_CONFIG_OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
- private static final String NAMESPACE = "http://test.jboss.org/addressrewrite";
-
- private String wsdlLocation;
- private String wsdlLocationSec;
- private Boolean modifySOAPAddress;
- private String webServiceHost;
-
- public void setUp() throws Exception
- {
- wsdlLocation = "http://" + getServerHost() + ":8080/jaxws-jbws2150/ValidURL?wsdl";
- wsdlLocationSec = "http://" + getServerHost() + ":8080/jaxws-jbws2150-sec/ValidURL?wsdl";
- if (modifySOAPAddress == null)
- {
- modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "ModifySOAPAddress");
- webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "WebServiceHost");
- }
- }
-
- public void tearDown() throws Exception
- {
- Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- attr = new Attribute("WebServiceHost", webServiceHost);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- }
-
- /**
- * Test soap:address rewrite
- * @throws Exception
- */
- public void testRewrite() throws Exception
- {
- setModifySOAPAddress(true);
- deploy("jaxws-jbws2150.war");
- try
- {
-
- Definition definition = getWSDLDefinition(wsdlLocation);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/ValidURL", address);
- ServiceIface endpoint = getEndpoint(wsdlLocation, "ValidURLService");
- assertEquals(endpoint.echo("hello"), "hello");
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
- endpoint = getEndpoint(wsdlLocation, "InvalidURLService");
- assertEquals(endpoint.echo("hello"), "hello");
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/ValidSecureURL", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150.war");
- }
- }
-
- /**
- * [JBWS-454] Test soap:address URL rewrite according to transport guarantee
- * @throws Exception
- */
- public void testSecureRewrite() throws Exception
- {
- setModifySOAPAddress(true);
- deploy("jaxws-jbws2150-sec.war");
- try
- {
- Definition definition = getWSDLDefinition(wsdlLocationSec);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidURL", address);
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidURL", address);
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidSecureURL", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150-sec.war");
- }
- }
-
- /**
- * Test no soap:address rewrite
- * @throws Exception
- */
- public void testNoRewrite() throws Exception
- {
- setModifySOAPAddress(false);
- deploy("jaxws-jbws2150.war");
- try
- {
- Definition definition = getWSDLDefinition(wsdlLocation);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("http://somehost:80/somepath", address);
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://somehost:443/some-secure-path", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150.war");
- }
- }
-
- private void setModifySOAPAddress(Boolean value) throws Exception
- {
- Attribute attr = new Attribute("ModifySOAPAddress", value);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- }
-
- private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
- {
- Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
- QName portName = service.getPorts().next();
- return service.getPort(portName, ServiceIface.class);
- }
-
- private Definition getWSDLDefinition(String wsdlLocation) throws Exception
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
-
- Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
- return definition;
- }
-
- private String getPortAddress(Definition definition, String serviceName, String portName)
- {
- Port port = definition.getService(new QName(NAMESPACE, serviceName)).getPort(portName);
- return ((SOAPAddressImpl)port.getExtensibilityElements().get(0)).getLocationURI();
- }
-
-}
Copied: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java (from rev 16111, shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java)
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -0,0 +1,196 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.jaxws.jbws2150;
+
+import java.net.URL;
+
+import javax.management.Attribute;
+import javax.management.ObjectName;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
+
+/**
+ * [JBWS-2150] Migrate AddressRewritingTestCase to jaxws
+ * @author richard.opalka(a)jboss.com
+ */
+public final class JBWS2150TestCaseForked extends JBossWSTest
+{
+ private static final ObjectName SERVER_CONFIG_OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
+ private static final String NAMESPACE = "http://test.jboss.org/addressrewrite";
+
+ private String wsdlLocation;
+ private String wsdlLocationSec;
+ private Boolean modifySOAPAddress;
+ private String webServiceHost;
+
+ public void setUp() throws Exception
+ {
+ wsdlLocation = "http://" + getServerHost() + ":8080/jaxws-jbws2150/ValidURL?wsdl";
+ wsdlLocationSec = "http://" + getServerHost() + ":8080/jaxws-jbws2150-sec/ValidURL?wsdl";
+ if (modifySOAPAddress == null)
+ {
+ modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "ModifySOAPAddress");
+ webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "WebServiceHost");
+ }
+ }
+
+ public void tearDown() throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ attr = new Attribute("WebServiceHost", webServiceHost);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ /**
+ * Test soap:address rewrite
+ * @throws Exception
+ */
+ public void testRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/ValidURL", address);
+ ServiceIface endpoint = getEndpoint(wsdlLocation, "ValidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
+ endpoint = getEndpoint(wsdlLocation, "InvalidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ /**
+ * [JBWS-454] Test soap:address URL rewrite according to transport guarantee
+ * @throws Exception
+ */
+ public void testSecureRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150-sec.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocationSec);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidURL", address);
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150-sec.war");
+ }
+ }
+
+ /**
+ * Test no soap:address rewrite
+ * @throws Exception
+ */
+ public void testNoRewrite() throws Exception
+ {
+ setModifySOAPAddress(false);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("http://somehost:80/somepath", address);
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://somehost:443/some-secure-path", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ private void setModifySOAPAddress(Boolean value) throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", value);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
+ {
+ Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
+ QName portName = service.getPorts().next();
+ return service.getPort(portName, ServiceIface.class);
+ }
+
+ private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+ Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+ return definition;
+ }
+
+ private String getPortAddress(Definition definition, String serviceName, String portName)
+ {
+ Port port = definition.getService(new QName(NAMESPACE, serviceName)).getPort(portName);
+ return ((SOAPAddressImpl)port.getExtensibilityElements().get(0)).getLocationURI();
+ }
+
+}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -39,19 +39,20 @@
{
private static final int THREADS_COUNT = 20;
private static final int REQUESTS_COUNT = 20;
- private static final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934";
private final Endpoint[] proxies = new Endpoint[THREADS_COUNT];
private final Thread[] threads = new Thread[THREADS_COUNT];
private final TestJob[] jobs = new TestJob[THREADS_COUNT];
private final Logger log = Logger.getLogger(this.getClass());
+ protected abstract String getEndpointAddress();
+
@Override
protected void setUp() throws Exception
{
super.setUp();
QName serviceName = new QName("http://jboss.org/jbws2934", "EndpointService");
- URL wsdlURL = new URL(ENDPOINT_ADDRESS + "?wsdl");
+ URL wsdlURL = new URL(getEndpointAddress() + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
for (int i = 0; i < THREADS_COUNT; i++)
@@ -60,21 +61,25 @@
public void testEndpointConcurrently() throws Exception
{
+ boolean traceEnabled = log.isTraceEnabled();
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Creating thread " + (i + 1));
- jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i);
+ if (traceEnabled)
+ log.debug("Creating thread " + (i + 1));
+ jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i, getEndpointAddress());
threads[i] = new Thread(jobs[i]);
}
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Starting thread " + (i + 1));
+ if (traceEnabled)
+ log.debug("Starting thread " + (i + 1));
threads[i].start();
}
Exception e = null;
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Joining thread " + (i + 1));
+ if (traceEnabled)
+ log.debug("Joining thread " + (i + 1));
threads[i].join();
if (e == null)
e = jobs[i].getException();
@@ -88,24 +93,28 @@
private final Endpoint proxy;
private final int countOfRequests;
private Exception exception;
+ private final String endpointAddress;
private static final Logger log = Logger.getLogger(TestJob.class);
- TestJob(Endpoint proxy, int countOfRequests, String jobName)
+ TestJob(Endpoint proxy, int countOfRequests, String jobName, String endpointAddress)
{
this.proxy = proxy;
this.countOfRequests = countOfRequests;
this.jobName = jobName;
+ this.endpointAddress = endpointAddress;
}
public void run()
{
try
{
+ boolean traceEnabled = log.isTraceEnabled();
for (int i = 0; i < this.countOfRequests; i++)
{
this.setQueryParameter(proxy, i);
int retVal = proxy.getQueryParameter(jobName);
- log.debug("Thread=" + this.jobName + ", iteration=" + i);
+ if (traceEnabled)
+ log.trace("Thread=" + this.jobName + ", iteration=" + i);
if (retVal != (i + 1))
throw new RuntimeException("Thread=" + this.jobName + ", iteration=" + i + ", received=" + retVal);
}
@@ -121,7 +130,7 @@
{
BindingProvider bp = (BindingProvider)proxy;
String queryString = "?" + this.jobName + "=" + value;
- bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_ADDRESS + queryString);
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress + queryString);
}
Exception getException()
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -47,7 +47,7 @@
)
@WebContext
(
- contextRoot = "/jaxws-jbws2934",
+ contextRoot = "/jaxws-jbws2934-ejb",
urlPattern = "/*"
)
public class EndpointEJB extends AbstractEndpoint
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -32,8 +32,16 @@
*/
public final class JBWS2934EJBTestCase extends AbstractTestCase
{
+ private final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934-ejb";
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934.jar");
+ return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934-ejb.jar");
}
+
+ @Override
+ protected String getEndpointAddress()
+ {
+ return ENDPOINT_ADDRESS;
+ }
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -32,8 +32,16 @@
*/
public final class JBWS2934JSETestCase extends AbstractTestCase
{
+ private final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934-jse";
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934.war");
+ return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934-jse.war");
}
+
+ @Override
+ protected String getEndpointAddress()
+ {
+ return ENDPOINT_ADDRESS;
+ }
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -31,7 +31,7 @@
try
{
//To cause the receive timeout
- Thread.sleep(3);
+ Thread.sleep(3000);
}
catch (InterruptedException e)
{
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -51,7 +51,7 @@
String response = port.echo("testjbws3114");
assertEquals("testjbws3114", response);
((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.connectionTimeout", "6000");
- ((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.receiveTimeout", "1");
+ ((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.receiveTimeout", "1000");
try
{
port.echo("testjbws3114");
Deleted: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,68 +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.jaxws.jbws3140;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-public class JBWS3140AddrResponsesTestCase extends JBossWSTest
-{
- public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS3140AddrResponsesTestCase.class, "jbws3140-responses-server.war, jbws3140-client.war");
- }
-
- public void testWsaResponses() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
- String result = readConnection(connection).toString();
- assertTrue("SOAPFaultException is expected but received: " + result, result.indexOf("SOAPFaultException") > -1);
- String expectedDetail = "A header representing a Message Addressing Property is not valid";
- assertTrue("Expected message wasn't found in response: " + result, result.indexOf(expectedDetail) > -1);
- }
-
- private ByteArrayOutputStream readConnection(HttpURLConnection connection)
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int count = 0;
- try
- {
- while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
- bout.write(buffer, 0, count);
- }
- }
- catch (IOException e)
- {
- }
- return bout;
- }
-
-}
Deleted: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,98 +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.jaxws.jbws3140;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import junit.framework.Test;
-/*
- * 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.
- */
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-public class JBWS3140MtomAddrFeatureTestCase extends JBossWSTest
-{
- public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS3140MtomAddrFeatureTestCase.class, "jbws3140-server.war, jbws3140-client.war");
- }
-
- /*mtom.threshold in DDs is not supported by CXF and Native stack
- public void testMtomLarge() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=large").openConnection();
- String result = readConnection(connection).toString();
- //this.assertEquals(expected, result);
- String expected ="--ClientMTOMNotEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
- assertTrue(result.indexOf(expected) > -1);
- }
- */
-
- public void testMtomSmall() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
- String result = readConnection(connection).toString();
- String expected ="--ClientMTOMEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
- assertTrue("Expected string wasn't found in response: " + result, result.indexOf(expected) > -1);
- }
-
- private ByteArrayOutputStream readConnection(HttpURLConnection connection)
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int count = 0;
- try
- {
- while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
- bout.write(buffer, 0, count);
- }
- }
- catch (IOException e)
- {
- }
- return bout;
- }
-
-}
Copied: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java (from rev 16111, shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java)
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -0,0 +1,87 @@
+/*
+ * 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.jaxws.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3140TestCase extends JBossWSTest
+{
+ public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS3140TestCase.class, "jbws3140-client.war");
+ }
+
+ public void testWsaResponses() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy("jbws3140-responses-server.war");
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ assertTrue("SOAPFaultException is expected but received: " + result, result.indexOf("SOAPFaultException") > -1);
+ String expectedDetail = "A header representing a Message Addressing Property is not valid";
+ assertTrue("Expected message wasn't found in response: " + result, result.indexOf(expectedDetail) > -1);
+ } finally {
+ JBossWSTestHelper.undeploy("jbws3140-responses-server.war");
+ }
+ }
+
+ public void testMtomSmall() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy("jbws3140-server.war");
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ String expected ="--ClientMTOMEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
+ assertTrue("Expected string wasn't found in response: " + result, result.indexOf(expected) > -1);
+ } finally {
+ JBossWSTestHelper.undeploy("jbws3140-server.war");
+ }
+ }
+
+ private ByteArrayOutputStream readConnection(HttpURLConnection connection)
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = 0;
+ try
+ {
+ while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
+ bout.write(buffer, 0, count);
+ }
+ }
+ catch (IOException e)
+ {
+ }
+ return bout;
+ }
+
+}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -33,7 +33,6 @@
{
public ResponseType mtomIn(DataType data)
{
- System.out.println("---invoking mtom -----");
ResponseType response = new ResponseType();
response.setReply(data.getDoc());
response.setResponse(data.getRequest());
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -50,7 +50,7 @@
public void testEJB3Endpoint() throws Exception
{
final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3367", "EJB3EndpointService");
- final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3367-customized/EJB3Endpoint?wsdl");
+ final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3367-customized2/EJB3Endpoint?wsdl");
final Service service = Service.create(wsdlURL, serviceName);
final EndpointIface port = service.getPort(EndpointIface.class);
final String result = port.echo("hello");
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -29,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.wsf.test.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -40,11 +41,16 @@
*/
public class WebServiceContextEJBTestCase extends JBossWSTest
{
- private Endpoint port;
+ private static Endpoint port;
public static Test suite()
{
- return new JBossWSTestSetup(WebServiceContextEJBTestCase.class, "jaxws-samples-context.jar", true);
+ return new JBossWSTestSetup(WebServiceContextEJBTestCase.class, "jaxws-samples-context.jar", true, new CleanupOperation() {
+ @Override
+ public void cleanUp() {
+ port = null;
+ }
+ });
}
public void setUp() throws Exception
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -29,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.wsf.test.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -40,18 +41,23 @@
*/
public class WebServiceContextJSETestCase extends JBossWSTest
{
- private Endpoint port;
+ private static Endpoint port;
public static Test suite()
{
- return new JBossWSTestSetup(WebServiceContextJSETestCase.class, "jaxws-samples-context.war", true);
+ return new JBossWSTestSetup(WebServiceContextJSETestCase.class, "jaxws-samples-context-jse.war", true, new CleanupOperation() {
+ @Override
+ public void cleanUp() {
+ port = null;
+ }
+ });
}
public void setUp() throws Exception
{
if (port == null)
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context-jse?wsdl");
QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
Service service = Service.create(wsdlURL, qname);
port = (Endpoint)service.getPort(Endpoint.class);
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -34,7 +34,7 @@
{
public static Test suite()
{
- return new JBossWSTestSetup(ExceptionServletTestCase.class, "jaxws-samples-exception.war, jaxws-samples-exception-client.war");
+ return new JBossWSTestSetup(ExceptionServletTestCase.class, "jaxws-samples-exception-jse.war, jaxws-samples-exception-client.war");
}
public void testRuntimeException() throws Exception
@@ -55,7 +55,7 @@
private String runTestInContainer(String test) throws Exception
{
URL url = new URL("http://" + getServerHost()
- + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception/ExceptionEndpointService&method=" + test
+ + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception-jse/ExceptionEndpointService&method=" + test
+ "&helper=" + ExceptionHelper.class.getName());
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
return br.readLine();
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2012-04-06 11:04:53 UTC (rev 16112)
@@ -35,7 +35,7 @@
{
public static Test suite()
{
- return new JBossWSTestSetup(ExceptionTestCase.class, "jaxws-samples-exception.war");
+ return new JBossWSTestSetup(ExceptionTestCase.class, "jaxws-samples-exception-jse.war");
}
public void testRuntimeException() throws Exception
@@ -76,6 +76,6 @@
protected ExceptionHelper getHelper()
{
- return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointService");
+ return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception-jse/ExceptionEndpointService");
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl 2012-04-06 11:04:53 UTC (rev 16112)
@@ -32,7 +32,7 @@
</binding>
<service name="SOAP12EndpointBeanService">
<port name="SOAP12EndpointPort" binding="tns:SOAP12EndpointBinding">
- <soap12:address location="http://127.0.0.1:9080/jaxws-jbws2419/soap12"/>
+ <soap12:address location="http://127.0.0.1:8080/jaxws-jbws2419/soap12"/>
</port>
</service>
</definitions>
Deleted: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml 2012-04-06 10:49:17 UTC (rev 16111)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml 2012-04-06 11:04:53 UTC (rev 16112)
@@ -1,9 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-
- <context-root>/jbws3367-customized2</context-root>
-
-</jboss-web>
Copied: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml (from rev 16111, shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml)
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml 2012-04-06 11:04:53 UTC (rev 16112)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+
+ <context-root>/jbws3367-customized2</context-root>
+
+</jboss-web>
12 years, 9 months
JBossWS SVN: r16111 - shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 06:49:17 -0400 (Fri, 06 Apr 2012)
New Revision: 16111
Modified:
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
Log:
Reduce logging of 2934 testcases
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-06 10:47:53 UTC (rev 16110)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-06 10:49:17 UTC (rev 16111)
@@ -61,21 +61,25 @@
public void testEndpointConcurrently() throws Exception
{
+ boolean traceEnabled = log.isTraceEnabled();
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Creating thread " + (i + 1));
+ if (traceEnabled)
+ log.debug("Creating thread " + (i + 1));
jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i, getEndpointAddress());
threads[i] = new Thread(jobs[i]);
}
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Starting thread " + (i + 1));
+ if (traceEnabled)
+ log.debug("Starting thread " + (i + 1));
threads[i].start();
}
Exception e = null;
for (int i = 0; i < THREADS_COUNT; i++)
{
- log.debug("Joining thread " + (i + 1));
+ if (traceEnabled)
+ log.debug("Joining thread " + (i + 1));
threads[i].join();
if (e == null)
e = jobs[i].getException();
@@ -104,11 +108,13 @@
{
try
{
+ boolean traceEnabled = log.isTraceEnabled();
for (int i = 0; i < this.countOfRequests; i++)
{
this.setQueryParameter(proxy, i);
int retVal = proxy.getQueryParameter(jobName);
- log.debug("Thread=" + this.jobName + ", iteration=" + i);
+ if (traceEnabled)
+ log.trace("Thread=" + this.jobName + ", iteration=" + i);
if (retVal != (i + 1))
throw new RuntimeException("Thread=" + this.jobName + ", iteration=" + i + ", received=" + retVal);
}
12 years, 9 months
JBossWS SVN: r16110 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 06:47:53 -0400 (Fri, 06 Apr 2012)
New Revision: 16110
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3482] Move to JUnit 4.10
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2012-04-06 10:47:07 UTC (rev 16109)
+++ stack/cxf/trunk/pom.xml 2012-04-06 10:47:53 UTC (rev 16110)
@@ -1245,7 +1245,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.2</version>
+ <version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
12 years, 9 months
JBossWS SVN: r16109 - stack/cxf/trunk/modules/resources.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 06:47:07 -0400 (Fri, 06 Apr 2012)
New Revision: 16109
Modified:
stack/cxf/trunk/modules/resources/pom.xml
Log:
[JBWS-3482] Adding jbossws-cxf-server dependency into jbossws-cxf-resources module to make sure they're built in the proper order when using maven parallel execution
Modified: stack/cxf/trunk/modules/resources/pom.xml
===================================================================
--- stack/cxf/trunk/modules/resources/pom.xml 2012-04-06 10:41:22 UTC (rev 16108)
+++ stack/cxf/trunk/modules/resources/pom.xml 2012-04-06 10:47:07 UTC (rev 16109)
@@ -13,13 +13,21 @@
<relativePath>../../pom.xml</relativePath>
</parent>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
<!-- plugins -->
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
- <execution>
+ <execution> <!-- TODO Move this stuff to 'server' to avoid needing the jbossws-cxf-server dependency above -->
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
12 years, 9 months
JBossWS SVN: r16108 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-06 06:41:22 -0400 (Fri, 06 Apr 2012)
New Revision: 16108
Modified:
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/jaxws/cxf/jbws3060/JBWS3060EJB3TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060ServletTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060Tests.java
Log:
[JBWS-3482] Use different context-root for endpoints that can be deployed concurrently
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-05 16:30:03 UTC (rev 16107)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-04-06 10:41:22 UTC (rev 16108)
@@ -177,7 +177,7 @@
<attribute name="Dependencies" value="org.jboss.logging"/>
</manifest>
</jar>
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3060.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/jbws3060/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3060-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/jbws3060/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/cxf/jbws3060/EndpointOneImpl.class"/>
<include name="org/jboss/test/ws/jaxws/cxf/jbws3060/EndpointTwoImpl.class"/>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060EJB3TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060EJB3TestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060EJB3TestCase.java 2012-04-06 10:41:22 UTC (rev 16108)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -32,8 +32,24 @@
*/
public class JBWS3060EJB3TestCase extends JBWS3060Tests
{
+ private String endpointOneURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060/ServiceOne/EndpointOne";
+ private String endpointTwoURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060/ServiceTwo/EndpointTwo";
+
public static Test suite()
{
return new JBossWSCXFTestSetup(JBWS3060EJB3TestCase.class, "jaxws-cxf-jbws3060.jar");
}
+
+ @Override
+ protected String getEndpointOneURL()
+ {
+ return endpointOneURL;
+ }
+
+
+ @Override
+ protected String getEndpointTwoURL()
+ {
+ return endpointTwoURL;
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060ServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060ServletTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060ServletTestCase.java 2012-04-06 10:41:22 UTC (rev 16108)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -32,9 +32,24 @@
*/
public class JBWS3060ServletTestCase extends JBWS3060Tests
{
+ private String endpointOneURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060-jse/ServiceOne/EndpointOne";
+ private String endpointTwoURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060-jse/ServiceTwo/EndpointTwo";
+
public static Test suite()
{
- return new JBossWSCXFTestSetup(JBWS3060ServletTestCase.class, "jaxws-cxf-jbws3060.war");
+ return new JBossWSCXFTestSetup(JBWS3060ServletTestCase.class, "jaxws-cxf-jbws3060-jse.war");
}
+ @Override
+ protected String getEndpointOneURL()
+ {
+ return endpointOneURL;
+ }
+
+
+ @Override
+ protected String getEndpointTwoURL()
+ {
+ return endpointTwoURL;
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060Tests.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060Tests.java 2012-04-05 16:30:03 UTC (rev 16107)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3060/JBWS3060Tests.java 2012-04-06 10:41:22 UTC (rev 16108)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -42,15 +42,17 @@
*/
public abstract class JBWS3060Tests extends JBossWSTest //*Tests does not match the configured surefire filter on test classes' names
{
- private String endpointOneURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060/ServiceOne/EndpointOne";
- private String endpointTwoURL = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3060/ServiceTwo/EndpointTwo";
private String targetNS = "http://org.jboss.ws.jaxws.cxf/jbws3060";
private EndpointOne portOne;
private EndpointTwo portTwo;
protected int defaultSize = 30;
+
+ protected abstract String getEndpointOneURL();
+ protected abstract String getEndpointTwoURL();
+
public void testAccess() throws Exception
{
initPorts();
@@ -101,12 +103,12 @@
private void initPorts() throws MalformedURLException
{
- URL wsdlOneURL = new URL(endpointOneURL + "?wsdl");
+ URL wsdlOneURL = new URL(getEndpointOneURL() + "?wsdl");
QName serviceOneName = new QName(targetNS, "ServiceOne");
Service serviceOne = Service.create(wsdlOneURL, serviceOneName);
portOne = (EndpointOne)serviceOne.getPort(EndpointOne.class);
- URL wsdlTwoURL = new URL(endpointTwoURL + "?wsdl");
+ URL wsdlTwoURL = new URL(getEndpointTwoURL() + "?wsdl");
QName serviceTwoName = new QName(targetNS, "ServiceTwo");
Service serviceTwo = Service.create(wsdlTwoURL, serviceTwoName);
portTwo = (EndpointTwo)serviceTwo.getPort(EndpointTwo.class);
12 years, 9 months
JBossWS SVN: r16107 - in shared-testsuite/branches/concurrent: testsuite/src/test/ant-import and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-05 12:30:03 -0400 (Thu, 05 Apr 2012)
New Revision: 16107
Added:
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/
shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml
Removed:
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
Modified:
shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/AppclientHelper.java
shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-jars-jaxws.xml
shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-samples-jaxws.xml
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl
Log:
* Minor refactoring to a bunch of tests to avoid duplication in context roots of endpoints belonging to different archives deployed by different tests
* Simple semaphore solution in AppclientHelper for serializing applclient test executions
Modified: shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -33,6 +33,7 @@
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.Semaphore;
import org.jboss.ws.common.concurrent.CopyJob;
import org.jboss.ws.common.io.TeeOutputStream;
@@ -48,7 +49,8 @@
private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS + "appclient" + EXT;
- private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>();
+ private static final Semaphore s = new Semaphore(1, true); //one appclient only can be running at the same time ATM
+ private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>(1);
private static ExecutorService es = Executors.newCachedThreadPool();
private static String appclientOutputDir;
@@ -89,6 +91,7 @@
}
finally
{
+ s.release();
ap.outTask.kill();
ap.errTask.kill();
ap.process.destroy();
@@ -96,47 +99,53 @@
}
}
- private static AppclientProcess newAppclientProcess(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws IOException
+ private static AppclientProcess newAppclientProcess(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws Exception
{
- final String killFileName = getKillFileName(archive);
- final String appclientFullName = getAppclientFullName(archive);
- final String appclientShortName = getAppclientShortName(archive);
- final AppclientProcess ap = new AppclientProcess();
- ap.output = new ByteArrayOutputStream();
- final List<String> args = new LinkedList<String>();
- args.add(appclientScript);
- args.add("--appclient-config=appclient-ws.xml");
- args.add(appclientFullName);
- if (appclientOS == null)
- {
- args.add(killFileName);
- }
- else
- {
- // propagate appclient args
- for (final String appclientArg : appclientArgs)
+ s.acquire();
+ try {
+ final String killFileName = getKillFileName(archive);
+ final String appclientFullName = getAppclientFullName(archive);
+ final String appclientShortName = getAppclientShortName(archive);
+ final AppclientProcess ap = new AppclientProcess();
+ ap.output = new ByteArrayOutputStream();
+ final List<String> args = new LinkedList<String>();
+ args.add(appclientScript);
+ args.add("--appclient-config=appclient-ws.xml");
+ args.add(appclientFullName);
+ if (appclientOS == null)
{
- args.add(appclientArg);
+ args.add(killFileName);
}
+ else
+ {
+ // propagate appclient args
+ for (final String appclientArg : appclientArgs)
+ {
+ args.add(appclientArg);
+ }
+ }
+ final ProcessBuilder pb = new ProcessBuilder().command(args);
+ // always propagate IPv6 related properties
+ final StringBuilder javaOptsValue = new StringBuilder();
+ javaOptsValue.append("\"-Djboss.bind.address=").append(undoIPv6Brackets(System.getProperty("jboss.bind.address", "localhost"))).append("\" ");
+ javaOptsValue.append("\"-Djava.net.preferIPv4Stack=").append(System.getProperty("java.net.preferIPv4Stack", "true")).append("\" ");
+ javaOptsValue.append("\"-Djava.net.preferIPv6Addresses=").append(System.getProperty("java.net.preferIPv6Addresses", "false")).append("\" ");
+ pb.environment().put("JAVA_OPTS", javaOptsValue.toString());
+ ap.process = pb.start();
+ ap.log = new FileOutputStream(new File(getAppclientOutputDir(), appclientShortName + ".log-" + System.currentTimeMillis()));
+ // appclient out
+ ap.outTask = new CopyJob(ap.process.getInputStream(),
+ appclientOS == null ? new TeeOutputStream(ap.output, ap.log) : new TeeOutputStream(ap.output, ap.log, appclientOS));
+ // appclient err
+ ap.errTask = new CopyJob(ap.process.getErrorStream(), ap.log);
+ // unfortunately the following threads are needed because of Windows behavior
+ es.submit(ap.outTask);
+ es.submit(ap.errTask);
+ return ap;
+ } catch (Exception e) {
+ s.release();
+ throw e;
}
- final ProcessBuilder pb = new ProcessBuilder().command(args);
- // always propagate IPv6 related properties
- final StringBuilder javaOptsValue = new StringBuilder();
- javaOptsValue.append("\"-Djboss.bind.address=").append(undoIPv6Brackets(System.getProperty("jboss.bind.address", "localhost"))).append("\" ");
- javaOptsValue.append("\"-Djava.net.preferIPv4Stack=").append(System.getProperty("java.net.preferIPv4Stack", "true")).append("\" ");
- javaOptsValue.append("\"-Djava.net.preferIPv6Addresses=").append(System.getProperty("java.net.preferIPv6Addresses", "false")).append("\" ");
- pb.environment().put("JAVA_OPTS", javaOptsValue.toString());
- ap.process = pb.start();
- ap.log = new FileOutputStream(new File(getAppclientOutputDir(), appclientShortName + ".log-" + System.currentTimeMillis()));
- // appclient out
- ap.outTask = new CopyJob(ap.process.getInputStream(),
- appclientOS == null ? new TeeOutputStream(ap.output, ap.log) : new TeeOutputStream(ap.output, ap.log, appclientOS));
- // appclient err
- ap.errTask = new CopyJob(ap.process.getErrorStream(), ap.log);
- // unfortunately the following threads are needed because of Windows behavior
- es.submit(ap.outTask);
- es.submit(ap.errTask);
- return ap;
}
private static String undoIPv6Brackets(final String s)
Modified: shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
--- shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -283,7 +283,7 @@
{
JBossWSTestHelper.undeployAppclient(archive, true);
}
- else
+ else if (!archive.endsWith("-client.jar"))
{
JBossWSTestHelper.undeploy(archive);
}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-04-05 16:30:03 UTC (rev 16107)
@@ -898,7 +898,7 @@
</war>
<!-- jaxws-jbws2934 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
<exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.class" />
@@ -906,7 +906,7 @@
</classes>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2934.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2934-ejb.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
<exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.class" />
@@ -1207,7 +1207,7 @@
<include name="org/jboss/test/ws/jaxws/jbws3367/EndpointIface.class"/>
<include name="org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.class"/>
</classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF">
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF-2">
<include name="jboss-web.xml" />
</webinf>
</war>
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-04-05 16:30:03 UTC (rev 16107)
@@ -53,7 +53,7 @@
</war>
<!-- jaxws-samples-context -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-samples-context.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/context/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-context-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/context/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/context/EndpointJSE.class"/>
</classes>
@@ -109,7 +109,7 @@
</jar>
<!-- jaxws-samples-exception -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-samples-exception.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/exception/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-exception-jse.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/exception/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws/**"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.class"/>
Deleted: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws1581;
-
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * EJB vehicle using loader repository not sufficiently isolated
- *
- * http://jira.jboss.org/jira/browse/JBWS-1581
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Mar-2007
- */
-public class JBWS1581EarTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1581EarTestCase.class, "jaxws-jbws1581.ear, jaxws-jbws1581-ejb3.jar");
- }
-
- public void testWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
- Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
- assertNotNull("wsdl expected", wsdl);
- }
-
- public void testEJBVehicle() throws Exception
- {
- InitialContext iniCtx = null;
- try
- {
- iniCtx = getServerInitialContext();
- EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
- }
- finally
- {
- if (iniCtx != null)
- {
- iniCtx.close();
- }
- }
- }
-}
Added: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java (rev 0)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581TestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.jaxws.jbws1581;
+
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * EJB vehicle using loader repository not sufficiently isolated
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1581
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 19-Mar-2007
+ */
+public class JBWS1581TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1581TestCase.class, "jaxws-jbws1581-ejb3.jar");
+ }
+
+ public void testWSDLAccessWar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581-pojo.war");
+ internalTestWSDLAccess();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581-pojo.war");
+ }
+ }
+
+ public void testEJBVehicleWar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581-pojo.war");
+ internalTestEJBVehicle();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581-pojo.war");
+ }
+ }
+
+ public void testWSDLAccessEar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581.ear");
+ internalTestWSDLAccess();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581.ear");
+ }
+ }
+
+ public void testEJBVehicleEar() throws Exception {
+ try {
+ JBossWSTestHelper.deploy("jaxws-jbws1581.ear");
+ internalTestEJBVehicle();
+ } finally {
+ JBossWSTestHelper.undeploy("jaxws-jbws1581.ear");
+ }
+ }
+
+ private void internalTestWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
+ Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
+ assertNotNull("wsdl expected", wsdl);
+ }
+
+ private void internalTestEJBVehicle() throws Exception
+ {
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
+ String retStr = remote.runTest("Hello World!");
+ assertEquals("Hello World!", retStr);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
+ }
+}
Deleted: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws1581;
-
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * EJB vehicle using loader repository not sufficiently isolated
- *
- * http://jira.jboss.org/jira/browse/JBWS-1581
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 19-Mar-2007
- */
-public class JBWS1581WarTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1581WarTestCase.class, "jaxws-jbws1581-pojo.war, jaxws-jbws1581-ejb3.jar");
- }
-
- public void testWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581-pojo?wsdl");
- Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
- assertNotNull("wsdl expected", wsdl);
- }
-
- public void testEJBVehicle() throws Exception
- {
- InitialContext iniCtx = null;
- try
- {
- iniCtx = getServerInitialContext();
- EJB3Remote remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
- }
- finally
- {
- if (iniCtx != null)
- {
- iniCtx.close();
- }
- }
- }
-}
Deleted: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -1,196 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jaxws.jbws2150;
-
-import java.net.URL;
-
-import javax.management.Attribute;
-import javax.management.ObjectName;
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import org.jboss.ws.common.ObjectNameFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
-
-/**
- * [JBWS-2150] Migrate AddressRewritingTestCase to jaxws
- * @author richard.opalka(a)jboss.com
- */
-public final class JBWS2150TestCase extends JBossWSTest
-{
- private static final ObjectName SERVER_CONFIG_OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
- private static final String NAMESPACE = "http://test.jboss.org/addressrewrite";
-
- private String wsdlLocation;
- private String wsdlLocationSec;
- private Boolean modifySOAPAddress;
- private String webServiceHost;
-
- public void setUp() throws Exception
- {
- wsdlLocation = "http://" + getServerHost() + ":8080/jaxws-jbws2150/ValidURL?wsdl";
- wsdlLocationSec = "http://" + getServerHost() + ":8080/jaxws-jbws2150-sec/ValidURL?wsdl";
- if (modifySOAPAddress == null)
- {
- modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "ModifySOAPAddress");
- webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "WebServiceHost");
- }
- }
-
- public void tearDown() throws Exception
- {
- Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- attr = new Attribute("WebServiceHost", webServiceHost);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- }
-
- /**
- * Test soap:address rewrite
- * @throws Exception
- */
- public void testRewrite() throws Exception
- {
- setModifySOAPAddress(true);
- deploy("jaxws-jbws2150.war");
- try
- {
-
- Definition definition = getWSDLDefinition(wsdlLocation);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/ValidURL", address);
- ServiceIface endpoint = getEndpoint(wsdlLocation, "ValidURLService");
- assertEquals(endpoint.echo("hello"), "hello");
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
- endpoint = getEndpoint(wsdlLocation, "InvalidURLService");
- assertEquals(endpoint.echo("hello"), "hello");
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/ValidSecureURL", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150.war");
- }
- }
-
- /**
- * [JBWS-454] Test soap:address URL rewrite according to transport guarantee
- * @throws Exception
- */
- public void testSecureRewrite() throws Exception
- {
- setModifySOAPAddress(true);
- deploy("jaxws-jbws2150-sec.war");
- try
- {
- Definition definition = getWSDLDefinition(wsdlLocationSec);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidURL", address);
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidURL", address);
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidSecureURL", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150-sec.war");
- }
- }
-
- /**
- * Test no soap:address rewrite
- * @throws Exception
- */
- public void testNoRewrite() throws Exception
- {
- setModifySOAPAddress(false);
- deploy("jaxws-jbws2150.war");
- try
- {
- Definition definition = getWSDLDefinition(wsdlLocation);
-
- String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
- assertEquals("http://somehost:80/somepath", address);
-
- address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
- assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
-
- address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
- assertEquals("https://somehost:443/some-secure-path", address);
-
- address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
- assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
- }
- finally
- {
- undeploy("jaxws-jbws2150.war");
- }
- }
-
- private void setModifySOAPAddress(Boolean value) throws Exception
- {
- Attribute attr = new Attribute("ModifySOAPAddress", value);
- getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
- }
-
- private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
- {
- Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
- QName portName = service.getPorts().next();
- return service.getPort(portName, ServiceIface.class);
- }
-
- private Definition getWSDLDefinition(String wsdlLocation) throws Exception
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
-
- Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
- return definition;
- }
-
- private String getPortAddress(Definition definition, String serviceName, String portName)
- {
- Port port = definition.getService(new QName(NAMESPACE, serviceName)).getPort(portName);
- return ((SOAPAddressImpl)port.getExtensibilityElements().get(0)).getLocationURI();
- }
-
-}
Added: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java (rev 0)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -0,0 +1,196 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.jaxws.jbws2150;
+
+import java.net.URL;
+
+import javax.management.Attribute;
+import javax.management.ObjectName;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
+
+/**
+ * [JBWS-2150] Migrate AddressRewritingTestCase to jaxws
+ * @author richard.opalka(a)jboss.com
+ */
+public final class JBWS2150TestCaseForked extends JBossWSTest
+{
+ private static final ObjectName SERVER_CONFIG_OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=ServerConfig");
+ private static final String NAMESPACE = "http://test.jboss.org/addressrewrite";
+
+ private String wsdlLocation;
+ private String wsdlLocationSec;
+ private Boolean modifySOAPAddress;
+ private String webServiceHost;
+
+ public void setUp() throws Exception
+ {
+ wsdlLocation = "http://" + getServerHost() + ":8080/jaxws-jbws2150/ValidURL?wsdl";
+ wsdlLocationSec = "http://" + getServerHost() + ":8080/jaxws-jbws2150-sec/ValidURL?wsdl";
+ if (modifySOAPAddress == null)
+ {
+ modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "ModifySOAPAddress");
+ webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME, "WebServiceHost");
+ }
+ }
+
+ public void tearDown() throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ attr = new Attribute("WebServiceHost", webServiceHost);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ /**
+ * Test soap:address rewrite
+ * @throws Exception
+ */
+ public void testRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/ValidURL", address);
+ ServiceIface endpoint = getEndpoint(wsdlLocation, "ValidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
+ endpoint = getEndpoint(wsdlLocation, "InvalidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ /**
+ * [JBWS-454] Test soap:address URL rewrite according to transport guarantee
+ * @throws Exception
+ */
+ public void testSecureRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150-sec.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocationSec);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidURL", address);
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150-sec/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150-sec.war");
+ }
+ }
+
+ /**
+ * Test no soap:address rewrite
+ * @throws Exception
+ */
+ public void testNoRewrite() throws Exception
+ {
+ setModifySOAPAddress(false);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService", "ValidURLPort");
+ assertEquals("http://somehost:80/somepath", address);
+
+ address = getPortAddress(definition, "InvalidURLService", "InvalidURLPort");
+ assertEquals("http://" + webServiceHost + ":8080/jaxws-jbws2150/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService", "ValidSecureURLPort");
+ assertEquals("https://somehost:443/some-secure-path", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService", "InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost + ":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ private void setModifySOAPAddress(Boolean value) throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", value);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
+ {
+ Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
+ QName portName = service.getPorts().next();
+ return service.getPort(portName, ServiceIface.class);
+ }
+
+ private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+ Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+ return definition;
+ }
+
+ private String getPortAddress(Definition definition, String serviceName, String portName)
+ {
+ Port port = definition.getService(new QName(NAMESPACE, serviceName)).getPort(portName);
+ return ((SOAPAddressImpl)port.getExtensibilityElements().get(0)).getLocationURI();
+ }
+
+}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -39,19 +39,20 @@
{
private static final int THREADS_COUNT = 20;
private static final int REQUESTS_COUNT = 20;
- private static final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934";
private final Endpoint[] proxies = new Endpoint[THREADS_COUNT];
private final Thread[] threads = new Thread[THREADS_COUNT];
private final TestJob[] jobs = new TestJob[THREADS_COUNT];
private final Logger log = Logger.getLogger(this.getClass());
+ protected abstract String getEndpointAddress();
+
@Override
protected void setUp() throws Exception
{
super.setUp();
QName serviceName = new QName("http://jboss.org/jbws2934", "EndpointService");
- URL wsdlURL = new URL(ENDPOINT_ADDRESS + "?wsdl");
+ URL wsdlURL = new URL(getEndpointAddress() + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
for (int i = 0; i < THREADS_COUNT; i++)
@@ -63,7 +64,7 @@
for (int i = 0; i < THREADS_COUNT; i++)
{
log.debug("Creating thread " + (i + 1));
- jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i);
+ jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i, getEndpointAddress());
threads[i] = new Thread(jobs[i]);
}
for (int i = 0; i < THREADS_COUNT; i++)
@@ -88,13 +89,15 @@
private final Endpoint proxy;
private final int countOfRequests;
private Exception exception;
+ private final String endpointAddress;
private static final Logger log = Logger.getLogger(TestJob.class);
- TestJob(Endpoint proxy, int countOfRequests, String jobName)
+ TestJob(Endpoint proxy, int countOfRequests, String jobName, String endpointAddress)
{
this.proxy = proxy;
this.countOfRequests = countOfRequests;
this.jobName = jobName;
+ this.endpointAddress = endpointAddress;
}
public void run()
@@ -121,7 +124,7 @@
{
BindingProvider bp = (BindingProvider)proxy;
String queryString = "?" + this.jobName + "=" + value;
- bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_ADDRESS + queryString);
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress + queryString);
}
Exception getException()
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -47,7 +47,7 @@
)
@WebContext
(
- contextRoot = "/jaxws-jbws2934",
+ contextRoot = "/jaxws-jbws2934-ejb",
urlPattern = "/*"
)
public class EndpointEJB extends AbstractEndpoint
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -32,8 +32,16 @@
*/
public final class JBWS2934EJBTestCase extends AbstractTestCase
{
+ private final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934-ejb";
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934.jar");
+ return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934-ejb.jar");
}
+
+ @Override
+ protected String getEndpointAddress()
+ {
+ return ENDPOINT_ADDRESS;
+ }
}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -32,8 +32,16 @@
*/
public final class JBWS2934JSETestCase extends AbstractTestCase
{
+ private final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934-jse";
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934.war");
+ return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934-jse.war");
}
+
+ @Override
+ protected String getEndpointAddress()
+ {
+ return ENDPOINT_ADDRESS;
+ }
}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/EndpointImpl.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -31,7 +31,7 @@
try
{
//To cause the receive timeout
- Thread.sleep(3);
+ Thread.sleep(3000);
}
catch (InterruptedException e)
{
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3114/JBWS3114TestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -51,7 +51,7 @@
String response = port.echo("testjbws3114");
assertEquals("testjbws3114", response);
((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.connectionTimeout", "6000");
- ((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.receiveTimeout", "1");
+ ((BindingProvider) port).getRequestContext().put("javax.xml.ws.client.receiveTimeout", "1000");
try
{
port.echo("testjbws3114");
Deleted: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140AddrResponsesTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -1,68 +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.jaxws.jbws3140;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-public class JBWS3140AddrResponsesTestCase extends JBossWSTest
-{
- public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS3140AddrResponsesTestCase.class, "jbws3140-responses-server.war, jbws3140-client.war");
- }
-
- public void testWsaResponses() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
- String result = readConnection(connection).toString();
- assertTrue("SOAPFaultException is expected but received: " + result, result.indexOf("SOAPFaultException") > -1);
- String expectedDetail = "A header representing a Message Addressing Property is not valid";
- assertTrue("Expected message wasn't found in response: " + result, result.indexOf(expectedDetail) > -1);
- }
-
- private ByteArrayOutputStream readConnection(HttpURLConnection connection)
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int count = 0;
- try
- {
- while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
- bout.write(buffer, 0, count);
- }
- }
- catch (IOException e)
- {
- }
- return bout;
- }
-
-}
Deleted: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140MtomAddrFeatureTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -1,98 +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.jaxws.jbws3140;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import junit.framework.Test;
-/*
- * 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.
- */
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-public class JBWS3140MtomAddrFeatureTestCase extends JBossWSTest
-{
- public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS3140MtomAddrFeatureTestCase.class, "jbws3140-server.war, jbws3140-client.war");
- }
-
- /*mtom.threshold in DDs is not supported by CXF and Native stack
- public void testMtomLarge() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=large").openConnection();
- String result = readConnection(connection).toString();
- //this.assertEquals(expected, result);
- String expected ="--ClientMTOMNotEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
- assertTrue(result.indexOf(expected) > -1);
- }
- */
-
- public void testMtomSmall() throws Exception
- {
- HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
- String result = readConnection(connection).toString();
- String expected ="--ClientMTOMEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
- assertTrue("Expected string wasn't found in response: " + result, result.indexOf(expected) > -1);
- }
-
- private ByteArrayOutputStream readConnection(HttpURLConnection connection)
- {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buffer = new byte[1024];
- int count = 0;
- try
- {
- while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
- bout.write(buffer, 0, count);
- }
- }
- catch (IOException e)
- {
- }
- return bout;
- }
-
-}
Added: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java (rev 0)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/JBWS3140TestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -0,0 +1,87 @@
+/*
+ * 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.jaxws.jbws3140;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3140TestCase extends JBossWSTest
+{
+ public final String servletClientURL = "http://" + getServerHost() + ":8080/jbws3140-client/ServletTest";
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS3140TestCase.class, "jbws3140-client.war");
+ }
+
+ public void testWsaResponses() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy("jbws3140-responses-server.war");
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ assertTrue("SOAPFaultException is expected but received: " + result, result.indexOf("SOAPFaultException") > -1);
+ String expectedDetail = "A header representing a Message Addressing Property is not valid";
+ assertTrue("Expected message wasn't found in response: " + result, result.indexOf(expectedDetail) > -1);
+ } finally {
+ JBossWSTestHelper.undeploy("jbws3140-responses-server.war");
+ }
+ }
+
+ public void testMtomSmall() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy("jbws3140-server.war");
+ HttpURLConnection connection = (HttpURLConnection) new URL(servletClientURL + "?mtom=small").openConnection();
+ String result = readConnection(connection).toString();
+ String expected ="--ClientMTOMEnabled--ServerMTOMEnabled--ServerAddressingEnabled--ClientAddressingEnabled";
+ assertTrue("Expected string wasn't found in response: " + result, result.indexOf(expected) > -1);
+ } finally {
+ JBossWSTestHelper.undeploy("jbws3140-server.war");
+ }
+ }
+
+ private ByteArrayOutputStream readConnection(HttpURLConnection connection)
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ byte[] buffer = new byte[1024];
+ int count = 0;
+ try
+ {
+ while( (count = connection.getInputStream().read(buffer, 0, 1024)) > -1) {
+ bout.write(buffer, 0, count);
+ }
+ }
+ catch (IOException e)
+ {
+ }
+ return bout;
+ }
+
+}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3140/MTOMTestImpl.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -33,7 +33,6 @@
{
public ResponseType mtomIn(DataType data)
{
- System.out.println("---invoking mtom -----");
ResponseType response = new ResponseType();
response.setReply(data.getDoc());
response.setResponse(data.getRequest());
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -50,7 +50,7 @@
public void testEJB3Endpoint() throws Exception
{
final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3367", "EJB3EndpointService");
- final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3367-customized/EJB3Endpoint?wsdl");
+ final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3367-customized2/EJB3Endpoint?wsdl");
final Service service = Service.create(wsdlURL, serviceName);
final EndpointIface port = service.getPort(EndpointIface.class);
final String result = port.echo("hello");
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -29,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.wsf.test.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -40,11 +41,16 @@
*/
public class WebServiceContextEJBTestCase extends JBossWSTest
{
- private Endpoint port;
+ private static Endpoint port;
public static Test suite()
{
- return new JBossWSTestSetup(WebServiceContextEJBTestCase.class, "jaxws-samples-context.jar", true);
+ return new JBossWSTestSetup(WebServiceContextEJBTestCase.class, "jaxws-samples-context.jar", true, new CleanupOperation() {
+ @Override
+ public void cleanUp() {
+ port = null;
+ }
+ });
}
public void setUp() throws Exception
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -29,6 +29,7 @@
import junit.framework.Test;
+import org.jboss.wsf.test.CleanupOperation;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -40,18 +41,23 @@
*/
public class WebServiceContextJSETestCase extends JBossWSTest
{
- private Endpoint port;
+ private static Endpoint port;
public static Test suite()
{
- return new JBossWSTestSetup(WebServiceContextJSETestCase.class, "jaxws-samples-context.war", true);
+ return new JBossWSTestSetup(WebServiceContextJSETestCase.class, "jaxws-samples-context-jse.war", true, new CleanupOperation() {
+ @Override
+ public void cleanUp() {
+ port = null;
+ }
+ });
}
public void setUp() throws Exception
{
if (port == null)
{
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-context-jse?wsdl");
QName qname = new QName("http://org.jboss.ws/jaxws/context", "EndpointService");
Service service = Service.create(wsdlURL, qname);
port = (Endpoint)service.getPort(Endpoint.class);
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -34,7 +34,7 @@
{
public static Test suite()
{
- return new JBossWSTestSetup(ExceptionServletTestCase.class, "jaxws-samples-exception.war, jaxws-samples-exception-client.war");
+ return new JBossWSTestSetup(ExceptionServletTestCase.class, "jaxws-samples-exception-jse.war, jaxws-samples-exception-client.war");
}
public void testRuntimeException() throws Exception
@@ -55,7 +55,7 @@
private String runTestInContainer(String test) throws Exception
{
URL url = new URL("http://" + getServerHost()
- + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception/ExceptionEndpointService&method=" + test
+ + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception-jse/ExceptionEndpointService&method=" + test
+ "&helper=" + ExceptionHelper.class.getName());
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
return br.readLine();
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2012-04-05 16:30:03 UTC (rev 16107)
@@ -35,7 +35,7 @@
{
public static Test suite()
{
- return new JBossWSTestSetup(ExceptionTestCase.class, "jaxws-samples-exception.war");
+ return new JBossWSTestSetup(ExceptionTestCase.class, "jaxws-samples-exception-jse.war");
}
public void testRuntimeException() throws Exception
@@ -76,6 +76,6 @@
protected ExceptionHelper getHelper()
{
- return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointService");
+ return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception-jse/ExceptionEndpointService");
}
}
Modified: shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl 2012-04-05 16:25:18 UTC (rev 16106)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws2419/WEB-INF/wsdl/SOAP12Service.wsdl 2012-04-05 16:30:03 UTC (rev 16107)
@@ -32,7 +32,7 @@
</binding>
<service name="SOAP12EndpointBeanService">
<port name="SOAP12EndpointPort" binding="tns:SOAP12EndpointBinding">
- <soap12:address location="http://127.0.0.1:9080/jaxws-jbws2419/soap12"/>
+ <soap12:address location="http://127.0.0.1:8080/jaxws-jbws2419/soap12"/>
</port>
</service>
</definitions>
Added: shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml
===================================================================
--- shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml (rev 0)
+++ shared-testsuite/branches/concurrent/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF-2/jboss-web.xml 2012-04-05 16:30:03 UTC (rev 16107)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+
+ <context-root>/jbws3367-customized2</context-root>
+
+</jboss-web>
12 years, 9 months
JBossWS SVN: r16106 - shared-testsuite/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-05 12:25:18 -0400 (Thu, 05 Apr 2012)
New Revision: 16106
Added:
shared-testsuite/branches/concurrent/
Log:
Branching for working on making the testsuite concurrent and runnable in parallel
12 years, 9 months