JBossWS SVN: r15782 - in stack/native/branches/jbossws-native-4.0.x: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-29 01:20:58 -0500 (Wed, 29 Feb 2012)
New Revision: 15782
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15779 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r15779 | ropalka | 2012-02-29 07:14:09 +0100 (Wed, 29 Feb 2012) | 1 line
sync. with AS7 upstream
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-29 06:16:48 UTC (rev 15781)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-29 06:20:58 UTC (rev 15782)
@@ -1108,9 +1108,9 @@
<version>2.7.1.patch01-brew</version>
</dependency>
<dependency>
- <groupId>org.jboss.remoting3</groupId>
+ <groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
- <version>1.0.1.Final</version>
+ <version>1.0.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
12 years, 7 months
JBossWS SVN: r15781 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-29 01:16:48 -0500 (Wed, 29 Feb 2012)
New Revision: 15781
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
Log:
fix build failure
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2012-02-29 06:14:34 UTC (rev 15780)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2012-02-29 06:16:48 UTC (rev 15781)
@@ -102,14 +102,6 @@
</manifest>
</war>
- <!-- jaxws-cxf-interop-wstrust10-client -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-interop-wstrust10-client.jar">
- <metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/interop/wstrust10/META-INF">
- <include name="**/*" />
- </metainf>
- </jar>
-
- <!-- jaxws-cxf-mixtype -->
<!-- jaxws-cxf-mixtype-->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-mixtype.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/mixtype/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
12 years, 7 months
JBossWS SVN: r15780 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-29 01:14:34 -0500 (Wed, 29 Feb 2012)
New Revision: 15780
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
sync. with AS7 upstream
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-29 06:14:09 UTC (rev 15779)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-29 06:14:34 UTC (rev 15780)
@@ -1234,9 +1234,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.remoting3</groupId>
+ <groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
- <version>1.0.1.Final</version>
+ <version>1.0.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
12 years, 7 months
JBossWS SVN: r15779 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-29 01:14:09 -0500 (Wed, 29 Feb 2012)
New Revision: 15779
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
sync. with AS7 upstream
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-02-28 15:17:40 UTC (rev 15778)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-02-29 06:14:09 UTC (rev 15779)
@@ -1108,9 +1108,9 @@
<version>2.7.1.patch01-brew</version>
</dependency>
<dependency>
- <groupId>org.jboss.remoting3</groupId>
+ <groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
- <version>1.0.1.Final</version>
+ <version>1.0.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
12 years, 7 months
JBossWS SVN: r15778 - in stack/native/branches/jbossws-native-4.0.x: modules/testsuite and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 10:17:40 -0500 (Tue, 28 Feb 2012)
New Revision: 15778
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15775,15777 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r15775 | ropalka | 2012-02-28 15:45:28 +0100 (Tue, 28 Feb 2012) | 1 line
[JBWS-3444] enabling appclient tests (WIP)
.......
r15777 | ropalka | 2012-02-28 16:05:49 +0100 (Tue, 28 Feb 2012) | 1 line
[AS7-3946] excluding tests
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-28 15:17:40 UTC (rev 15778)
@@ -298,12 +298,16 @@
<include name="webservices.xml"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-enventry-client.jar">
+ <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-enventry-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/enventry/EnvEntryTestService.class"/>
<include name="org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.class"/>
<include name="org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.class"/>
+ <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
</fileset>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
+ </manifest>
<metainf dir="${tests.output.dir}/test-resources/jaxrpc/enventry/WEB-INF">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
@@ -313,7 +317,12 @@
<include name="jboss-client.xml"/>
</metainf>
</jar>
-
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-enventry-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-enventry-appclient.jar"/>
+ </fileset>
+ </jar>
+
<!-- jaxrpc-jbas897 -->
<jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbas897.jar">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-02-28 15:17:40 UTC (rev 15778)
@@ -768,7 +768,7 @@
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class" />
</fileset>
</jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class" />
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class" />
@@ -779,10 +779,15 @@
<include name="jboss-client.xml" />
</metainf>
<manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient" />
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient" />
</manifest>
</jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-override-webserviceref-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-webserviceref-secure-appclient.jar"/>
+ </fileset>
+ </jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.class" />
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
@@ -800,6 +805,11 @@
<attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo" />
</manifest>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-webserviceref-override-appclient.jar"/>
+ </fileset>
+ </jar>
<!-- jaxws-webserviceref-secure -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure.jar">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -21,21 +21,19 @@
*/
package org.jboss.test.ws.jaxrpc.enventry;
+import java.io.IOException;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.wsf.test.JBossWSTest;
+
public class ClientSideHandler extends EnvEntryHandler
{
- public InitialContext getInitialContext() throws NamingException
+ public InitialContext getInitialContext() throws NamingException, IOException
{
- Properties env = new Properties();
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
- env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHost() + ":1099");
- env.setProperty("j2ee.clientName", "jbossws-client");
- return new InitialContext(env);
+ return JBossWSTest.getAppclientInitialContext();
}
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -38,10 +38,11 @@
public class EnvEntryEJBTestCase extends JBossWSTest
{
private static EnvEntryTestService port;
+ private static InitialContext appclientCtx;
public static Test suite()
{
- return new JBossWSTestSetup(EnvEntryEJBTestCase.class, "jaxrpc-enventry.jar, jaxrpc-enventry-client.jar");
+ return new JBossWSTestSetup(EnvEntryEJBTestCase.class, "jaxrpc-enventry.jar, jaxrpc-enventry-appclient.ear#jaxrpc-enventry-appclient.jar");
}
protected void setUp() throws Exception
@@ -49,12 +50,22 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ appclientCtx = getAppclientInitialContext();
+ Service service = (Service)appclientCtx.lookup("java:service/TestService");
port = (EnvEntryTestService)service.getPort(EnvEntryTestService.class);
}
}
+ protected void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testEndpoint() throws Exception
{
String res = port.helloEnvEntry("InitalMessage");
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxrpc.enventry;
+import java.io.IOException;
+
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.namespace.QName;
@@ -73,12 +75,24 @@
SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
value = soapElement.getValue();
- InitialContext ic = getInitialContext();
- String strValue = (String)ic.lookup("java:comp/env/jsr109/entry1");
- Integer intValue = (Integer)ic.lookup("java:comp/env/jsr109/entry2");
-
- value = value + ":" + getHandlerName() + ":" + strValue + ":" + intValue;
- soapElement.setValue(value);
+ InitialContext ic = null;
+ try
+ {
+ ic = getInitialContext();
+ String strValue = (String)ic.lookup("java:comp/env/jsr109/entry1");
+ Integer intValue = (Integer)ic.lookup("java:comp/env/jsr109/entry2");
+
+ value = value + ":" + getHandlerName() + ":" + strValue + ":" + intValue;
+ soapElement.setValue(value);
+ }
+ finally
+ {
+ if (ic != null)
+ {
+ ic.close();
+ ic = null;
+ }
+ }
}
catch (Exception e)
{
@@ -94,7 +108,7 @@
return handlerName.substring(handlerName.lastIndexOf(".") + 1);
}
- abstract public InitialContext getInitialContext() throws NamingException;
+ abstract public InitialContext getInitialContext() throws NamingException, IOException;
/**
* Get the JBoss server host from system property "jboss.bind.address"
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -38,10 +38,11 @@
public class EnvEntryJSETestCase extends JBossWSTest
{
private static EnvEntryTestService port;
+ private static InitialContext appclientCtx;
public static Test suite()
{
- return new JBossWSTestSetup(EnvEntryJSETestCase.class, "jaxrpc-enventry.war, jaxrpc-enventry-client.jar");
+ return new JBossWSTestSetup(EnvEntryJSETestCase.class, "jaxrpc-enventry.war, jaxrpc-enventry-appclient.ear#jaxrpc-enventry-appclient.jar");
}
protected void setUp() throws Exception
@@ -49,12 +50,22 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ appclientCtx = getAppclientInitialContext();
+ Service service = (Service)appclientCtx.lookup("java:service/TestService");
port = (EnvEntryTestService)service.getPort(EnvEntryTestService.class);
}
}
+ protected void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testEndpoint() throws Exception
{
String res = port.helloEnvEntry("InitalMessage");
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -46,6 +46,7 @@
public static void main(String[] args)
{
+ System.out.println("TEST START");
String reqMsg = args[0];
log.info("echo: " + reqMsg);
@@ -76,6 +77,8 @@
{
throw new IllegalArgumentException("Invalid req messge: " + reqMsg);
}
+ System.out.println("TEST END");
+ System.out.println("RESULT [" + retStr + "] RESULT");
}
private static String invokeEndpoint(SecureEndpoint port, String inStr, String username, String password)
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -21,14 +21,13 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
import junit.framework.Test;
-import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -43,70 +42,77 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefOverridesTestCase.class, "jaxws-webserviceref.war, jaxws-override-webserviceref-client.jar");
+ return new JBossWSTestSetup(ServiceRefOverridesTestCase.class, "jaxws-webserviceref.war");
}
public void testService1() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testService2() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testService3() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testService4() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testPort1() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testPort2() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testPort3() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
- @SuppressWarnings("unchecked")
- private String invokeTest(String reqStr) throws Throwable
+ private String executeApplicationClient(final String... appclientArgs) throws Throwable
{
- new ClientLauncher().launch(TestEndpointClientTwo.class.getName(), "jbossws-client", new String[] { reqStr });
- Class<?> empty[] = {};
- try
- {
- //Use reflection to compile on AS 5.0.0.CR1 too
- Method getMainClassMethod = ClientLauncher.class.getMethod("getTheMainClass", empty);
- //At least JBoss AS 5.0.0.CR2
- //Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new Object[] {});
- Field field = clientClass.getField("testResult");
- return ((Map<String, String>)field.get(clientClass)).get(reqStr);
+ final OutputStream appclientOS = new ByteArrayOutputStream();
+ JBossWSTestHelper.deployAppclient("jaxws-webserviceref-override-appclient.ear#jaxws-webserviceref-override-appclient.jar", appclientOS, appclientArgs);
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
}
- catch (NoSuchMethodException e)
- {
- //JBoss AS 5.0.0.CR1
- return TestEndpointClientTwo.testResult.get(reqStr);
- }
+ // assert appclient logs
+ assertTrue(appclientLog.contains("TEST START"));
+ assertTrue(appclientLog.contains("TEST END"));
+ assertTrue(appclientLog.contains("RESULT ["));
+ assertTrue(appclientLog.contains("] RESULT"));
+ int indexOfResultStart = appclientLog.indexOf("RESULT [");
+ int indexOfResultStop = appclientLog.indexOf("] RESULT");
+ assertTrue(indexOfResultStart > 0);
+ assertTrue(indexOfResultStop > 0);
+ return appclientLog.substring(indexOfResultStart + 8, indexOfResultStop);
}
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -21,10 +21,10 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.net.URL;
-import java.io.InputStream;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -32,15 +32,15 @@
import junit.framework.Test;
-import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceRef
*
* @author Thomas.Diesler(a)jboss.com
- * @since 23-Oct-2005
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class StubPropertyTestCase extends JBossWSTest
{
@@ -48,7 +48,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(StubPropertyTestCase.class, "jaxws-webserviceref-secure.jar, jaxws-secure-webserviceref-client.jar");
+ return new JBossWSTestSetup(StubPropertyTestCase.class, "jaxws-webserviceref-secure.jar", true);
}
public void testWSDLAccess() throws Exception
@@ -78,63 +78,65 @@
public void testExplicitSecureService1() throws Throwable
{
String reqMsg = "SecureService1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testExplicitSecureService2() throws Throwable
{
String reqMsg = "SecureService2";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testExplicitSecurePort1() throws Throwable
{
String reqMsg = "SecurePort1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecureService1() throws Throwable
{
String reqMsg = "SecureService1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecureService2() throws Throwable
{
- String reqMsg = "SecureService2";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String reqMsg = "SecureService2";
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecurePort1() throws Throwable
{
- String reqMsg = "SecurePort1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String reqMsg = "SecurePort1";
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
-
- private static void assertResult(String expected) throws Exception
+
+ private String executeApplicationClient(final String... appclientArgs) throws Throwable
{
- Class<?> empty[] = {};
- try
- {
- //Use reflection to compile on AS 5.0.0.CR1 too
- Method getMainClassMethod = ClientLauncher.class.getMethod("getTheMainClass", empty);
- //At least JBoss AS 5.0.0.CR2
- //Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new Object[] {});
- Field field = clientClass.getField("retStr");
- String result = (String)field.get(clientClass);
- assertEquals(expected, result);
+ final OutputStream appclientOS = new ByteArrayOutputStream();
+ JBossWSTestHelper.deployAppclient("jaxws-webserviceref-secure-appclient.ear#jaxws-webserviceref-secure-appclient.jar", appclientOS, appclientArgs);
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
}
- catch (NoSuchMethodException e)
- {
- //JBoss AS 5.0.0.CR1
- assertEquals(expected, SecureEndpointClient.retStr);
- }
+ // assert appclient logs
+ assertTrue(appclientLog.contains("TEST START"));
+ assertTrue(appclientLog.contains("TEST END"));
+ assertTrue(appclientLog.contains("RESULT ["));
+ assertTrue(appclientLog.contains("] RESULT"));
+ int indexOfResultStart = appclientLog.indexOf("RESULT [");
+ int indexOfResultStop = appclientLog.indexOf("] RESULT");
+ assertTrue(indexOfResultStart > 0);
+ assertTrue(indexOfResultStop > 0);
+ return appclientLog.substring(indexOfResultStart + 8, indexOfResultStop);
}
+
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2012-02-28 15:17:40 UTC (rev 15778)
@@ -21,23 +21,20 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import org.jboss.logging.Logger;
-import org.jboss.test.ws.jaxws.webserviceref.TestEndpoint;
-import org.jboss.test.ws.jaxws.webserviceref.TestEndpointService;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
-import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
+import org.jboss.logging.Logger;
+
@WebServiceRef(name = "Service1", type=TestEndpointService.class)
// Test multiple on type
@WebServiceRefs
@@ -75,16 +72,13 @@
{
if (iniCtx == null)
{
- InitialContext ctx = new InitialContext();
- Hashtable env = ctx.getEnvironment();
- env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
- env.put("j2ee.clientName", "jbossws-client");
- iniCtx = new InitialContext(env);
+ iniCtx = new InitialContext();
}
}
public static void main(String[] args) throws Exception
{
+ System.out.println("TEST START");
String testName = args[0];
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo client = new org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo();
Method method = org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.class.getMethod(testName, new Class[] { String.class });
@@ -103,6 +97,8 @@
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.log.error("Error", ex);
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.testResult.put(testName, ex.toString());
}
+ System.out.println("TEST END");
+ System.out.println("RESULT [" + org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.testResult.get(testName) + "] RESULT");
}
/**
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml 2012-02-28 15:17:40 UTC (rev 15778)
@@ -8,19 +8,19 @@
<display-name>JAXRPC simple tests</display-name>
<env-entry>
- <env-entry-name>jsr109/entry1</env-entry-name>
+ <env-entry-name>java:jboss/exported/comp/env/jsr109/entry1</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>appclient</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>jsr109/entry2</env-entry-name>
+ <env-entry-name>java:jboss/exported/comp/env/jsr109/entry2</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>8</env-entry-value>
</env-entry>
<service-ref>
- <service-ref-name>service/TestService</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/TestService</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2012-02-28 15:17:40 UTC (rev 15778)
@@ -3,10 +3,9 @@
<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
<service-ref>
- <service-ref-name>service/TestService</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/TestService</service-ref-name>
<wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-enventry/EnvEntryBeanEJB?wsdl</wsdl-override>
</service-ref>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-28 15:05:49 UTC (rev 15777)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-28 15:17:40 UTC (rev 15778)
@@ -1127,21 +1127,6 @@
<configuration>
<compilerArgument>-Djava.endorsed.dirs=${endorsed.dirs}</compilerArgument>
</configuration>
- <executions>
- <execution>
- <id>default-testCompile</id>
- <phase>test-compile</phase>
- <configuration>
- <testExcludes>
- <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
- <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- </testExcludes>
- </configuration>
- <goals>
- <goal>testCompile</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@@ -1171,9 +1156,6 @@
<exclude>org/jboss/test/ws/jaxws/jbws3182/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1988/UsernameAuthTestCase*</exclude>
- <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
- <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
-
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
@@ -1189,8 +1171,6 @@
<exclude>org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/encoded/marshalltest/MarshallTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase*</exclude>
@@ -1288,6 +1268,8 @@
<!-- # unpackaged EAR deployment failure -->
<exclude>org/jboss/test/ws/jaxrpc/jbws358/JBWS358TestCase*</exclude>
+ <!-- # [AS7-3946] waiting for jboss metadata 7.0.1.Final upgrade -->
+ <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
</excludes>
</configuration>
</plugin>
12 years, 7 months
JBossWS SVN: r15777 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 10:05:49 -0500 (Tue, 28 Feb 2012)
New Revision: 15777
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[AS7-3946] excluding tests
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-02-28 15:00:44 UTC (rev 15776)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-02-28 15:05:49 UTC (rev 15777)
@@ -1268,6 +1268,8 @@
<!-- # unpackaged EAR deployment failure -->
<exclude>org/jboss/test/ws/jaxrpc/jbws358/JBWS358TestCase*</exclude>
+ <!-- # [AS7-3946] waiting for jboss metadata 7.0.1.Final upgrade -->
+ <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
</excludes>
</configuration>
</plugin>
12 years, 7 months
JBossWS SVN: r15776 - shared-testsuite/trunk/testsuite/src/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 10:00:44 -0500 (Tue, 28 Feb 2012)
New Revision: 15776
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
Log:
Cleanup java.endorsed.dirs from AS6 configuration
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-02-28 14:45:28 UTC (rev 15775)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-testsuite.xml 2012-02-28 15:00:44 UTC (rev 15776)
@@ -115,7 +115,7 @@
<property name="jboss.lib" value="${jboss.home}/lib"/>
<!-- Java Endorsed -->
- <condition property="endorsed.dirs" value="${jboss.home}/lib/endorsed${path.separator}${jboss.home}/modules/javax/xml/ws/api/main/">
+ <condition property="endorsed.dirs" value="${jboss.home}/modules/javax/xml/ws/api/main/">
<isset property="jboss.home"/>
</condition>
@@ -710,7 +710,7 @@
<eclipseClasspathGenerator pathId="tests.eclipse.classpath" excludesFile="${excludesfile}" srcPath="tests/java"/>
<eclipseProjectGenerator projectName="JBossWS Testsuite"/>
<eclipseJUnitTestGenerator projectName="JBossWS Testsuite" projectWorkingDir="${tests.output.dir}" srcDir="${tests.dir}/test-java"
- integrationTarget="${jbossws.integration.target}" endorsedDir="${jboss.lib}/endorsed" jbossHome="${jboss.home}" namingProviderUrl="${node0.jndi.url}"
+ integrationTarget="${jbossws.integration.target}" endorsedDir="${endorsed.dirs}" jbossHome="${jboss.home}" namingProviderUrl="${node0.jndi.url}"
securityPolicy="${tests.output.dir}/test-classes/tst.policy" testResourcesDir="${tests.output.dir}/test-resources" testLibsDir="${tests.output.dir}/test-libs">
<fileset dir="${tests.output.dir}/test-classes" includes="org/jboss/test/ws/**/*TestCase.class" excludes="exclude.wildcard"/>
</eclipseJUnitTestGenerator>
12 years, 7 months
JBossWS SVN: r15775 - in stack/native/trunk/modules/testsuite: native-tests/scripts and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 09:45:28 -0500 (Tue, 28 Feb 2012)
New Revision: 15775
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3444] enabling appclient tests (WIP)
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-28 14:45:28 UTC (rev 15775)
@@ -298,12 +298,16 @@
<include name="webservices.xml"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-enventry-client.jar">
+ <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-enventry-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/enventry/EnvEntryTestService.class"/>
<include name="org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.class"/>
<include name="org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.class"/>
+ <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
</fileset>
+ <manifest>
+ <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
+ </manifest>
<metainf dir="${tests.output.dir}/test-resources/jaxrpc/enventry/WEB-INF">
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
@@ -313,7 +317,12 @@
<include name="jboss-client.xml"/>
</metainf>
</jar>
-
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-enventry-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-enventry-appclient.jar"/>
+ </fileset>
+ </jar>
+
<!-- jaxrpc-jbas897 -->
<jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbas897.jar">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-02-28 14:45:28 UTC (rev 15775)
@@ -768,7 +768,7 @@
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class" />
</fileset>
</jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class" />
<include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class" />
@@ -779,10 +779,15 @@
<include name="jboss-client.xml" />
</metainf>
<manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient" />
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient" />
</manifest>
</jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-override-webserviceref-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-webserviceref-secure-appclient.jar"/>
+ </fileset>
+ </jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.class" />
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
@@ -800,6 +805,11 @@
<attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo" />
</manifest>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-webserviceref-override-appclient.jar"/>
+ </fileset>
+ </jar>
<!-- jaxws-webserviceref-secure -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure.jar">
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/ClientSideHandler.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -21,21 +21,19 @@
*/
package org.jboss.test.ws.jaxrpc.enventry;
+import java.io.IOException;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import org.jboss.wsf.test.JBossWSTest;
+
public class ClientSideHandler extends EnvEntryHandler
{
- public InitialContext getInitialContext() throws NamingException
+ public InitialContext getInitialContext() throws NamingException, IOException
{
- Properties env = new Properties();
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
- env.setProperty(Context.PROVIDER_URL, "jnp://" + getServerHost() + ":1099");
- env.setProperty("j2ee.clientName", "jbossws-client");
- return new InitialContext(env);
+ return JBossWSTest.getAppclientInitialContext();
}
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -38,10 +38,11 @@
public class EnvEntryEJBTestCase extends JBossWSTest
{
private static EnvEntryTestService port;
+ private static InitialContext appclientCtx;
public static Test suite()
{
- return new JBossWSTestSetup(EnvEntryEJBTestCase.class, "jaxrpc-enventry.jar, jaxrpc-enventry-client.jar");
+ return new JBossWSTestSetup(EnvEntryEJBTestCase.class, "jaxrpc-enventry.jar, jaxrpc-enventry-appclient.ear#jaxrpc-enventry-appclient.jar");
}
protected void setUp() throws Exception
@@ -49,12 +50,22 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ appclientCtx = getAppclientInitialContext();
+ Service service = (Service)appclientCtx.lookup("java:service/TestService");
port = (EnvEntryTestService)service.getPort(EnvEntryTestService.class);
}
}
+ protected void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testEndpoint() throws Exception
{
String res = port.helloEnvEntry("InitalMessage");
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryHandler.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxrpc.enventry;
+import java.io.IOException;
+
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.namespace.QName;
@@ -73,12 +75,24 @@
SOAPElement soapElement = (SOAPElement)soapBodyElement.getChildElements().next();
value = soapElement.getValue();
- InitialContext ic = getInitialContext();
- String strValue = (String)ic.lookup("java:comp/env/jsr109/entry1");
- Integer intValue = (Integer)ic.lookup("java:comp/env/jsr109/entry2");
-
- value = value + ":" + getHandlerName() + ":" + strValue + ":" + intValue;
- soapElement.setValue(value);
+ InitialContext ic = null;
+ try
+ {
+ ic = getInitialContext();
+ String strValue = (String)ic.lookup("java:comp/env/jsr109/entry1");
+ Integer intValue = (Integer)ic.lookup("java:comp/env/jsr109/entry2");
+
+ value = value + ":" + getHandlerName() + ":" + strValue + ":" + intValue;
+ soapElement.setValue(value);
+ }
+ finally
+ {
+ if (ic != null)
+ {
+ ic.close();
+ ic = null;
+ }
+ }
}
catch (Exception e)
{
@@ -94,7 +108,7 @@
return handlerName.substring(handlerName.lastIndexOf(".") + 1);
}
- abstract public InitialContext getInitialContext() throws NamingException;
+ abstract public InitialContext getInitialContext() throws NamingException, IOException;
/**
* Get the JBoss server host from system property "jboss.bind.address"
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -38,10 +38,11 @@
public class EnvEntryJSETestCase extends JBossWSTest
{
private static EnvEntryTestService port;
+ private static InitialContext appclientCtx;
public static Test suite()
{
- return new JBossWSTestSetup(EnvEntryJSETestCase.class, "jaxrpc-enventry.war, jaxrpc-enventry-client.jar");
+ return new JBossWSTestSetup(EnvEntryJSETestCase.class, "jaxrpc-enventry.war, jaxrpc-enventry-appclient.ear#jaxrpc-enventry-appclient.jar");
}
protected void setUp() throws Exception
@@ -49,12 +50,22 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ appclientCtx = getAppclientInitialContext();
+ Service service = (Service)appclientCtx.lookup("java:service/TestService");
port = (EnvEntryTestService)service.getPort(EnvEntryTestService.class);
}
}
+ protected void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testEndpoint() throws Exception
{
String res = port.helloEnvEntry("InitalMessage");
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -46,6 +46,7 @@
public static void main(String[] args)
{
+ System.out.println("TEST START");
String reqMsg = args[0];
log.info("echo: " + reqMsg);
@@ -76,6 +77,8 @@
{
throw new IllegalArgumentException("Invalid req messge: " + reqMsg);
}
+ System.out.println("TEST END");
+ System.out.println("RESULT [" + retStr + "] RESULT");
}
private static String invokeEndpoint(SecureEndpoint port, String inStr, String username, String password)
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -21,14 +21,13 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Map;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
import junit.framework.Test;
-import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -43,70 +42,77 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefOverridesTestCase.class, "jaxws-webserviceref.war, jaxws-override-webserviceref-client.jar");
+ return new JBossWSTestSetup(ServiceRefOverridesTestCase.class, "jaxws-webserviceref.war");
}
public void testService1() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testService2() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testService3() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testService4() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testPort1() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testPort2() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
public void testPort3() throws Throwable
{
- String resStr = invokeTest(getName());
- assertEquals(getName() + getName(), resStr);
+ final String reqMsg = getName();
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg + reqMsg, respMsg);
}
- @SuppressWarnings("unchecked")
- private String invokeTest(String reqStr) throws Throwable
+ private String executeApplicationClient(final String... appclientArgs) throws Throwable
{
- new ClientLauncher().launch(TestEndpointClientTwo.class.getName(), "jbossws-client", new String[] { reqStr });
- Class<?> empty[] = {};
- try
- {
- //Use reflection to compile on AS 5.0.0.CR1 too
- Method getMainClassMethod = ClientLauncher.class.getMethod("getTheMainClass", empty);
- //At least JBoss AS 5.0.0.CR2
- //Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new Object[] {});
- Field field = clientClass.getField("testResult");
- return ((Map<String, String>)field.get(clientClass)).get(reqStr);
+ final OutputStream appclientOS = new ByteArrayOutputStream();
+ JBossWSTestHelper.deployAppclient("jaxws-webserviceref-override-appclient.ear#jaxws-webserviceref-override-appclient.jar", appclientOS, appclientArgs);
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
}
- catch (NoSuchMethodException e)
- {
- //JBoss AS 5.0.0.CR1
- return TestEndpointClientTwo.testResult.get(reqStr);
- }
+ // assert appclient logs
+ assertTrue(appclientLog.contains("TEST START"));
+ assertTrue(appclientLog.contains("TEST END"));
+ assertTrue(appclientLog.contains("RESULT ["));
+ assertTrue(appclientLog.contains("] RESULT"));
+ int indexOfResultStart = appclientLog.indexOf("RESULT [");
+ int indexOfResultStop = appclientLog.indexOf("] RESULT");
+ assertTrue(indexOfResultStart > 0);
+ assertTrue(indexOfResultStop > 0);
+ return appclientLog.substring(indexOfResultStart + 8, indexOfResultStop);
}
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -21,10 +21,10 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.net.URL;
-import java.io.InputStream;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -32,15 +32,15 @@
import junit.framework.Test;
-import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceRef
*
* @author Thomas.Diesler(a)jboss.com
- * @since 23-Oct-2005
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class StubPropertyTestCase extends JBossWSTest
{
@@ -48,7 +48,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(StubPropertyTestCase.class, "jaxws-webserviceref-secure.jar, jaxws-secure-webserviceref-client.jar");
+ return new JBossWSTestSetup(StubPropertyTestCase.class, "jaxws-webserviceref-secure.jar", true);
}
public void testWSDLAccess() throws Exception
@@ -78,63 +78,65 @@
public void testExplicitSecureService1() throws Throwable
{
String reqMsg = "SecureService1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testExplicitSecureService2() throws Throwable
{
String reqMsg = "SecureService2";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testExplicitSecurePort1() throws Throwable
{
String reqMsg = "SecurePort1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg, "kermit", "thefrog");
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecureService1() throws Throwable
{
String reqMsg = "SecureService1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecureService2() throws Throwable
{
- String reqMsg = "SecureService2";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String reqMsg = "SecureService2";
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
public void testImplicitSecurePort1() throws Throwable
{
- String reqMsg = "SecurePort1";
- new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
- assertResult(reqMsg);
+ final String reqMsg = "SecurePort1";
+ final String respMsg = executeApplicationClient(reqMsg);
+ assertEquals(reqMsg, respMsg);
}
-
- private static void assertResult(String expected) throws Exception
+
+ private String executeApplicationClient(final String... appclientArgs) throws Throwable
{
- Class<?> empty[] = {};
- try
- {
- //Use reflection to compile on AS 5.0.0.CR1 too
- Method getMainClassMethod = ClientLauncher.class.getMethod("getTheMainClass", empty);
- //At least JBoss AS 5.0.0.CR2
- //Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new Object[] {});
- Field field = clientClass.getField("retStr");
- String result = (String)field.get(clientClass);
- assertEquals(expected, result);
+ final OutputStream appclientOS = new ByteArrayOutputStream();
+ JBossWSTestHelper.deployAppclient("jaxws-webserviceref-secure-appclient.ear#jaxws-webserviceref-secure-appclient.jar", appclientOS, appclientArgs);
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
}
- catch (NoSuchMethodException e)
- {
- //JBoss AS 5.0.0.CR1
- assertEquals(expected, SecureEndpointClient.retStr);
- }
+ // assert appclient logs
+ assertTrue(appclientLog.contains("TEST START"));
+ assertTrue(appclientLog.contains("TEST END"));
+ assertTrue(appclientLog.contains("RESULT ["));
+ assertTrue(appclientLog.contains("] RESULT"));
+ int indexOfResultStart = appclientLog.indexOf("RESULT [");
+ int indexOfResultStop = appclientLog.indexOf("] RESULT");
+ assertTrue(indexOfResultStart > 0);
+ assertTrue(indexOfResultStop > 0);
+ return appclientLog.substring(indexOfResultStart + 8, indexOfResultStop);
}
+
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.java 2012-02-28 14:45:28 UTC (rev 15775)
@@ -21,23 +21,20 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import org.jboss.logging.Logger;
-import org.jboss.test.ws.jaxws.webserviceref.TestEndpoint;
-import org.jboss.test.ws.jaxws.webserviceref.TestEndpointService;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
-import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Map;
+import org.jboss.logging.Logger;
+
@WebServiceRef(name = "Service1", type=TestEndpointService.class)
// Test multiple on type
@WebServiceRefs
@@ -75,16 +72,13 @@
{
if (iniCtx == null)
{
- InitialContext ctx = new InitialContext();
- Hashtable env = ctx.getEnvironment();
- env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
- env.put("j2ee.clientName", "jbossws-client");
- iniCtx = new InitialContext(env);
+ iniCtx = new InitialContext();
}
}
public static void main(String[] args) throws Exception
{
+ System.out.println("TEST START");
String testName = args[0];
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo client = new org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo();
Method method = org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.class.getMethod(testName, new Class[] { String.class });
@@ -103,6 +97,8 @@
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.log.error("Error", ex);
org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.testResult.put(testName, ex.toString());
}
+ System.out.println("TEST END");
+ System.out.println("RESULT [" + org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.testResult.get(testName) + "] RESULT");
}
/**
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/application-client.xml 2012-02-28 14:45:28 UTC (rev 15775)
@@ -8,19 +8,19 @@
<display-name>JAXRPC simple tests</display-name>
<env-entry>
- <env-entry-name>jsr109/entry1</env-entry-name>
+ <env-entry-name>java:jboss/exported/comp/env/jsr109/entry1</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>appclient</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>jsr109/entry2</env-entry-name>
+ <env-entry-name>java:jboss/exported/comp/env/jsr109/entry2</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>8</env-entry-value>
</env-entry>
<service-ref>
- <service-ref-name>service/TestService</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/TestService</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/enventry/META-INF/jboss-client.xml 2012-02-28 14:45:28 UTC (rev 15775)
@@ -3,10 +3,9 @@
<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
<service-ref>
- <service-ref-name>service/TestService</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/TestService</service-ref-name>
<wsdl-override>http://@jboss.bind.address@:8080/jaxrpc-enventry/EnvEntryBeanEJB?wsdl</wsdl-override>
</service-ref>
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-02-28 14:43:04 UTC (rev 15774)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-02-28 14:45:28 UTC (rev 15775)
@@ -1127,21 +1127,6 @@
<configuration>
<compilerArgument>-Djava.endorsed.dirs=${endorsed.dirs}</compilerArgument>
</configuration>
- <executions>
- <execution>
- <id>default-testCompile</id>
- <phase>test-compile</phase>
- <configuration>
- <testExcludes>
- <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
- <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- </testExcludes>
- </configuration>
- <goals>
- <goal>testCompile</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@@ -1171,9 +1156,6 @@
<exclude>org/jboss/test/ws/jaxws/jbws3182/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1988/UsernameAuthTestCase*</exclude>
- <!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
- <exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
-
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
@@ -1189,8 +1171,6 @@
<exclude>org/jboss/test/ws/jaxrpc/encoded/href/MarshallTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/encoded/marshalltest/MarshallTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/encoded/parametermode/ParameterModeTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/enventry/EnvEntryEJBTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/enventry/EnvEntryJSETestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbas897/JBAS897TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase*</exclude>
12 years, 7 months
JBossWS SVN: r15774 - in stack/cxf/branches/jbossws-cxf-4.0.x: modules/dist/src/main/distro and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 09:43:04 -0500 (Tue, 28 Feb 2012)
New Revision: 15774
Removed:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/distro/build.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15768,15773 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r15768 | alessio.soldano(a)jboss.com | 2012-02-28 11:42:25 +0100 (Tue, 28 Feb 2012) | 2 lines
Removing AS6 tests (former WS JMS support, replaced by SOAP-over-JMS on AS 7.x)
.......
r15773 | alessio.soldano(a)jboss.com | 2012-02-28 15:38:09 +0100 (Tue, 28 Feb 2012) | 2 lines
[JBWS-3447] Sort jbossws-cxf bin dist classpath
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
+ https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766,15768,15773
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/distro/build.xml 2012-02-28 14:38:09 UTC (rev 15773)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/distro/build.xml 2012-02-28 14:43:04 UTC (rev 15774)
@@ -76,10 +76,14 @@
</target>
<target name="tests-init" depends="init,tests-classpath">
-
+ <!-- JBossWS jars first to override META-INF/services declarations duplicated in CXF jars (alternative is using endorsing) -->
<path id="ws.stack.classpath">
<fileset dir="${thirdparty.dir}">
+ <include name="**/jbossws*.jar"/>
<exclude name="**/jbossws-jboss*.jar"/>
+ </fileset>
+ <fileset dir="${thirdparty.dir}">
+ <exclude name="**/jbossws*.jar"/>
<exclude name="**/jboss-as-webservices-tests-integration.jar"/>
</fileset>
</path>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml 2012-02-28 14:38:09 UTC (rev 15773)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml 2012-02-28 14:43:04 UTC (rev 15774)
@@ -716,9 +716,6 @@
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [AS7-1322] Implemented on AS 7.1.0 or greater only -->
<exclude>org/jboss/test/ws/publish/EndpointPublishTestCase*</exclude>
@@ -895,9 +892,6 @@
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [AS7-1322] Implemented on AS 7.1.0 or greater only -->
<exclude>org/jboss/test/ws/publish/EndpointPublishTestCase*</exclude>
@@ -1106,9 +1100,6 @@
<!-- # Seems MSFT interop. endpoints are down :(-->
<exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher // also see compile exclude above -->
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
@@ -1322,9 +1313,6 @@
<!-- # Seems MSFT interop. endpoints are down :(-->
<exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
12 years, 7 months
JBossWS SVN: r15773 - stack/cxf/trunk/modules/dist/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 09:38:09 -0500 (Tue, 28 Feb 2012)
New Revision: 15773
Modified:
stack/cxf/trunk/modules/dist/src/main/distro/build.xml
Log:
[JBWS-3447] Sort jbossws-cxf bin dist classpath
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2012-02-28 14:21:09 UTC (rev 15772)
+++ stack/cxf/trunk/modules/dist/src/main/distro/build.xml 2012-02-28 14:38:09 UTC (rev 15773)
@@ -76,10 +76,14 @@
</target>
<target name="tests-init" depends="init,tests-classpath">
-
+ <!-- JBossWS jars first to override META-INF/services declarations duplicated in CXF jars (alternative is using endorsing) -->
<path id="ws.stack.classpath">
<fileset dir="${thirdparty.dir}">
+ <include name="**/jbossws*.jar"/>
<exclude name="**/jbossws-jboss*.jar"/>
+ </fileset>
+ <fileset dir="${thirdparty.dir}">
+ <exclude name="**/jbossws*.jar"/>
<exclude name="**/jboss-as-webservices-tests-integration.jar"/>
</fileset>
</path>
12 years, 7 months