JBossWS SVN: r15762 - in stack/native/branches/jbossws-native-4.0.x: modules/testsuite and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 10:12:44 -0500 (Mon, 27 Feb 2012)
New Revision: 15762
Added:
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml
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-samples-jaxrpc.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15761 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r15761 | ropalka | 2012-02-27 16:07:39 +0100 (Mon, 27 Feb 2012) | 1 line
[JBWS-3444] enabling appclient tests (WIP)
.......
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
+ /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
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-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -2026,11 +2026,15 @@
<include name="wsdl/**"/>
</webinf>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/jbws1010/InheritenceChildInterface.class"/>
<include name="org/jboss/test/ws/jaxrpc/jbws1010/InheritenceParentInterface.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/jbws1010/META-INF">
<include name="application-client.xml"/>
<include name="jboss-client.xml"/>
@@ -2040,7 +2044,12 @@
<include name="wsdl/**"/>
</metainf>
</jar>
-
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-jbws1010-appclient.jar"/>
+ </fileset>
+ </jar>
+
<!-- jaxrpc-jbws1011 -->
<jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1011.jar">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -446,23 +446,32 @@
<include name="webservices.xml"/>
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
+ <include name="jboss-ejb3.xml"/>
<include name="jboss-webservices.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-client.jar">
+ <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationHome.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationRemote.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/samples/secureejb/META-INF">
<include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-samples-secureejb-appclient.jar"/>
+ </fileset>
+ </jar>
<!-- jaxrpc-samples-serviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/WEB-INF/web.xml">
@@ -478,19 +487,27 @@
<include name="webservices.xml"/>
</webinf>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.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/samples/serviceref/META-INF">
<include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-samples-serviceref-appclient.jar"/>
+ </fileset>
+ </jar>
<war destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-servlet-client.war"
webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/servlet-client/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java 2012-02-27 15:12:44 UTC (rev 15762)
@@ -41,10 +41,11 @@
{
private static InheritenceChildInterface port;
-
+ private static InitialContext iniCtx;
+
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(JBWS1010TestCase.class, "jaxrpc-jbws1010.war, jaxrpc-jbws1010-client.jar");
+ return new JBossWSTestSetup(JBWS1010TestCase.class, "jaxrpc-jbws1010.war, jaxrpc-jbws1010-appclient.ear#jaxrpc-jbws1010-appclient.jar");
}
public void setUp() throws Exception
@@ -52,12 +53,21 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ iniCtx = getAppclientInitialContext();
+ Service service = (Service)iniCtx.lookup("java:service/TestService");
port = (InheritenceChildInterface)service.getPort(InheritenceChildInterface.class);
}
}
+ public void tearDown() throws Exception
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ iniCtx = null;
+ }
+ }
+
public void testGetA() throws Exception
{
String response = port.getA();
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 15:12:44 UTC (rev 15762)
@@ -46,12 +46,29 @@
{
public static final String USERNAME = "kermit";
public static final String PASSWORD = "thefrog";
+ private InitialContext appclientCtx;
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-client.jar");
+ return new JBossWSTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-appclient.ear#jaxrpc-samples-secureejb-appclient.jar", true);
}
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ appclientCtx = getAppclientInitialContext();
+ }
+
+ public void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testRoleSecuredWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-samples-ejb/RoleSecured?wsdl");
@@ -62,8 +79,7 @@
public void testRoleSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/RoleSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "RoleSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -85,22 +101,9 @@
assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
}
- /** Test that the remote access to this bean is unchecked
- */
- public void testBasicSecuredSLSB() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/BasicSecuredSLSB");
-
- OrganizationRemote bean = home.create();
- String info = bean.getContactInfo("mafia");
- assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
- }
-
public void testBasicSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/BasicSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "BasicSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -132,8 +135,7 @@
public void testConfidentialServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/ConfidentialSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "ConfidentialPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -153,10 +155,5 @@
{
// ignore expected exception
}
-
- // test confidential access
- //stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "https://" + getServerHost() + ":8443/jaxrpc-samples-ejb/ConfidentialSecured");
- //String info = port.getContactInfo("mafia");
- //assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
}
}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java 2012-02-27 15:12:44 UTC (rev 15762)
@@ -1,68 +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.jaxrpc.samples.serviceref;
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Service;
-
-import org.jboss.logging.Logger;
-
-public class ApplicationClient
-{
- // Provide logging
- private static Logger log = Logger.getLogger(ApplicationClient.class);
-
- public static InitialContext encCtx;
- public static String retStr;
-
- public static void main(String[] args) throws RemoteException
- {
- String inStr = args[0];
- log.info("echo: " + inStr);
-
- ArrayList ports = new ArrayList();
- try
- {
- ports.add((TestEndpoint)((Service)encCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)encCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
- }
- catch (Exception ex)
- {
- log.error("Cannot add port", ex);
- throw new JAXRPCException(ex);
- }
-
- for (int i = 0; i < ports.size(); i++)
- {
- TestEndpoint port = (TestEndpoint)ports.get(i);
- String outStr = port.echo(inStr);
- if (inStr.equals(outStr) == false)
- throw new JAXRPCException("Invalid echo return: " + inStr);
- }
-
- retStr = inStr;
- }
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 15:12:44 UTC (rev 15762)
@@ -25,6 +25,7 @@
import java.net.MalformedURLException;
import java.net.URL;
+import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceException;
@@ -50,7 +51,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxrpc-samples-serviceref.war, jaxrpc-samples-serviceref-client.jar");
+ return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxrpc-samples-serviceref.war, jaxrpc-samples-serviceref-appclient.ear#jaxrpc-samples-serviceref-appclient.jar");
}
public void testWSDLAccess() throws MalformedURLException
@@ -96,9 +97,24 @@
public void testApplicationClient() throws Exception
{
- String helloWorld = "Hello World!";
- ApplicationClient.encCtx = getInitialContext();
- ApplicationClient.main(new String[] { helloWorld });
- assertEquals(helloWorld, ApplicationClient.retStr);
+ InitialContext ctx = null;
+ try
+ {
+ ctx = getAppclientInitialContext();
+ final TestEndpoint port1 = (TestEndpoint)((Service)ctx.lookup("java:service1")).getPort(TestEndpoint.class);
+ final TestEndpoint port2 = ((TestEndpointService)ctx.lookup("java:service2")).getTestEndpointPort();
+ final String msg = "Hello World!";
+
+ assertEquals(msg, port1.echo(msg));
+ assertEquals(msg, port2.echo(msg));
+ }
+ finally
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
}
+
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 15:12:44 UTC (rev 15762)
@@ -74,12 +74,23 @@
public void testEJBClient() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
- EJBRemote ejbRemote = ejbHome.create();
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
+ EJBRemote ejbRemote = ejbHome.create();
- String helloWorld = "Hello World!";
- Object retObj = ejbRemote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello World!";
+ Object retObj = ejbRemote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -8,7 +8,7 @@
<display-name>HelloService</display-name>
<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/jbws1010/META-INF/jboss-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -6,7 +6,7 @@
<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-jbws1010?wsdl</wsdl-override>
</service-ref>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -8,19 +8,19 @@
<display-name>webservice client app</display-name>
<service-ref>
- <service-ref-name>service/BasicSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/BasicSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
</service-ref>
<service-ref>
- <service-ref-name>service/RoleSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/RoleSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
</service-ref>
<service-ref>
- <service-ref-name>service/ConfidentialSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/ConfidentialSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!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>
-</jboss-client>
Copied: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml (from rev 15761, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml)
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml (rev 0)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<jboss:jboss
+ xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
+ xmlns:spec="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd
+ http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd"
+ version="3.1"
+ impl-version="2.0">
+
+ <spec:assembly-descriptor>
+ <security xmlns="urn:security">
+ <spec:ejb-name>RoleSecuredSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <security xmlns="urn:security">
+ <spec:ejb-name>BasicSecuredSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <security xmlns="urn:security">
+ <spec:ejb-name>ConfidentialSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <spec:security-role>
+ <spec:role-name>friend</spec:role-name>
+ </spec:security-role>
+ </spec:assembly-descriptor>
+
+</jboss:jboss>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -8,7 +8,7 @@
<display-name>JAXRPC simple tests</display-name>
<service-ref>
- <service-ref-name>service1</service-ref-name>
+ <service-ref-name>java:jboss/exported/service1</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
@@ -18,7 +18,7 @@
</service-ref>
<service-ref>
- <service-ref-name>service2</service-ref-name>
+ <service-ref-name>java:jboss/exported/service2</service-ref-name>
<service-interface>org.jboss.test.ws.jaxrpc.samples.serviceref.TestEndpointService</service-interface>
<wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!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>
-</jboss-client>
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-27 15:07:39 UTC (rev 15761)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-27 15:12:44 UTC (rev 15762)
@@ -1135,7 +1135,6 @@
<testExcludes>
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
<exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
</testExcludes>
</configuration>
<goals>
@@ -1174,18 +1173,10 @@
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
<exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- # TODO: appclient -->
- <exclude>org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase*</exclude>
-
- <!-- # TODO: remote JNDI support (non EJB objects) -->
- <exclude>org/jboss/test/ws/jaxrpc/samples/secureejb/**</exclude>
-
<!-- # [JBWS-3234] JNDI over RMI not available on AS7 -->
<exclude>org/jboss/test/ws/jaxws/wsaddressing/replyto/**</exclude>
@@ -1201,7 +1192,6 @@
<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/jbws1010/JBWS1010TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase*</exclude>
12 years, 9 months
JBossWS SVN: r15761 - in stack/native/trunk/modules/testsuite: native-tests/scripts and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 10:07:39 -0500 (Mon, 27 Feb 2012)
New Revision: 15761
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml
Modified:
stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-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-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -2026,11 +2026,15 @@
<include name="wsdl/**"/>
</webinf>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/jbws1010/InheritenceChildInterface.class"/>
<include name="org/jboss/test/ws/jaxrpc/jbws1010/InheritenceParentInterface.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/jbws1010/META-INF">
<include name="application-client.xml"/>
<include name="jboss-client.xml"/>
@@ -2040,7 +2044,12 @@
<include name="wsdl/**"/>
</metainf>
</jar>
-
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1010-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-jbws1010-appclient.jar"/>
+ </fileset>
+ </jar>
+
<!-- jaxrpc-jbws1011 -->
<jar destfile="${tests.output.dir}/test-libs/jaxrpc-jbws1011.jar">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -446,23 +446,32 @@
<include name="webservices.xml"/>
<include name="ejb-jar.xml"/>
<include name="jboss.xml"/>
+ <include name="jboss-ejb3.xml"/>
<include name="jboss-webservices.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-client.jar">
+ <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationHome.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationRemote.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/samples/secureejb/META-INF">
<include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-samples-secureejb-appclient.jar"/>
+ </fileset>
+ </jar>
<!-- jaxrpc-samples-serviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/WEB-INF/web.xml">
@@ -478,19 +487,27 @@
<include name="webservices.xml"/>
</webinf>
</war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-client.jar">
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.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/samples/serviceref/META-INF">
<include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
<include name="jaxrpc-mapping.xml"/>
<include name="wsdl/**"/>
</metainf>
</jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxrpc-samples-serviceref-appclient.jar"/>
+ </fileset>
+ </jar>
<war destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-servlet-client.war"
webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/servlet-client/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1010/JBWS1010TestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
@@ -41,10 +41,11 @@
{
private static InheritenceChildInterface port;
-
+ private static InitialContext iniCtx;
+
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(JBWS1010TestCase.class, "jaxrpc-jbws1010.war, jaxrpc-jbws1010-client.jar");
+ return new JBossWSTestSetup(JBWS1010TestCase.class, "jaxrpc-jbws1010.war, jaxrpc-jbws1010-appclient.ear#jaxrpc-jbws1010-appclient.jar");
}
public void setUp() throws Exception
@@ -52,12 +53,21 @@
super.setUp();
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
+ iniCtx = getAppclientInitialContext();
+ Service service = (Service)iniCtx.lookup("java:service/TestService");
port = (InheritenceChildInterface)service.getPort(InheritenceChildInterface.class);
}
}
+ public void tearDown() throws Exception
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ iniCtx = null;
+ }
+ }
+
public void testGetA() throws Exception
{
String response = port.getA();
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
@@ -46,12 +46,29 @@
{
public static final String USERNAME = "kermit";
public static final String PASSWORD = "thefrog";
+ private InitialContext appclientCtx;
public static Test suite() throws Exception
{
- return new JBossWSTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-client.jar");
+ return new JBossWSTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-appclient.ear#jaxrpc-samples-secureejb-appclient.jar", true);
}
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ appclientCtx = getAppclientInitialContext();
+ }
+
+ public void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testRoleSecuredWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxrpc-samples-ejb/RoleSecured?wsdl");
@@ -62,8 +79,7 @@
public void testRoleSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/RoleSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "RoleSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -85,22 +101,9 @@
assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
}
- /** Test that the remote access to this bean is unchecked
- */
- public void testBasicSecuredSLSB() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/BasicSecuredSLSB");
-
- OrganizationRemote bean = home.create();
- String info = bean.getContactInfo("mafia");
- assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
- }
-
public void testBasicSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/BasicSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "BasicSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -132,8 +135,7 @@
public void testConfidentialServiceAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/ConfidentialSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "ConfidentialPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -153,10 +155,5 @@
{
// ignore expected exception
}
-
- // test confidential access
- //stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "https://" + getServerHost() + ":8443/jaxrpc-samples-ejb/ConfidentialSecured");
- //String info = port.getContactInfo("mafia");
- //assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
}
}
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.java 2012-02-27 15:07:39 UTC (rev 15761)
@@ -1,68 +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.jaxrpc.samples.serviceref;
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.JAXRPCException;
-import javax.xml.rpc.Service;
-
-import org.jboss.logging.Logger;
-
-public class ApplicationClient
-{
- // Provide logging
- private static Logger log = Logger.getLogger(ApplicationClient.class);
-
- public static InitialContext encCtx;
- public static String retStr;
-
- public static void main(String[] args) throws RemoteException
- {
- String inStr = args[0];
- log.info("echo: " + inStr);
-
- ArrayList ports = new ArrayList();
- try
- {
- ports.add((TestEndpoint)((Service)encCtx.lookup("java:comp/env/service1")).getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)encCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
- }
- catch (Exception ex)
- {
- log.error("Cannot add port", ex);
- throw new JAXRPCException(ex);
- }
-
- for (int i = 0; i < ports.size(); i++)
- {
- TestEndpoint port = (TestEndpoint)ports.get(i);
- String outStr = port.echo(inStr);
- if (inStr.equals(outStr) == false)
- throw new JAXRPCException("Invalid echo return: " + inStr);
- }
-
- retStr = inStr;
- }
-}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
@@ -25,6 +25,7 @@
import java.net.MalformedURLException;
import java.net.URL;
+import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceException;
@@ -50,7 +51,7 @@
public static Test suite()
{
- return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxrpc-samples-serviceref.war, jaxrpc-samples-serviceref-client.jar");
+ return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxrpc-samples-serviceref.war, jaxrpc-samples-serviceref-appclient.ear#jaxrpc-samples-serviceref-appclient.jar");
}
public void testWSDLAccess() throws MalformedURLException
@@ -96,9 +97,24 @@
public void testApplicationClient() throws Exception
{
- String helloWorld = "Hello World!";
- ApplicationClient.encCtx = getInitialContext();
- ApplicationClient.main(new String[] { helloWorld });
- assertEquals(helloWorld, ApplicationClient.retStr);
+ InitialContext ctx = null;
+ try
+ {
+ ctx = getAppclientInitialContext();
+ final TestEndpoint port1 = (TestEndpoint)((Service)ctx.lookup("java:service1")).getPort(TestEndpoint.class);
+ final TestEndpoint port2 = ((TestEndpointService)ctx.lookup("java:service2")).getTestEndpointPort();
+ final String msg = "Hello World!";
+
+ assertEquals(msg, port1.echo(msg));
+ assertEquals(msg, port2.echo(msg));
+ }
+ finally
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
}
+
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 15:07:39 UTC (rev 15761)
@@ -74,12 +74,23 @@
public void testEJBClient() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
- EJBRemote ejbRemote = ejbHome.create();
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
+ EJBRemote ejbRemote = ejbHome.create();
- String helloWorld = "Hello World!";
- Object retObj = ejbRemote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello World!";
+ Object retObj = ejbRemote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -8,7 +8,7 @@
<display-name>HelloService</display-name>
<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/jbws1010/META-INF/jboss-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/jbws1010/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -6,7 +6,7 @@
<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-jbws1010?wsdl</wsdl-override>
</service-ref>
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -8,19 +8,19 @@
<display-name>webservice client app</display-name>
<service-ref>
- <service-ref-name>service/BasicSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/BasicSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
</service-ref>
<service-ref>
- <service-ref-name>service/RoleSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/RoleSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
</service-ref>
<service-ref>
- <service-ref-name>service/ConfidentialSecured</service-ref-name>
+ <service-ref-name>java:jboss/exported/service/ConfidentialSecured</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/OrganizationService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!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>
-</jboss-client>
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/secureejb/META-INF/jboss-ejb3.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<jboss:jboss
+ xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
+ xmlns:spec="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd
+ http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd"
+ version="3.1"
+ impl-version="2.0">
+
+ <spec:assembly-descriptor>
+ <security xmlns="urn:security">
+ <spec:ejb-name>RoleSecuredSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <security xmlns="urn:security">
+ <spec:ejb-name>BasicSecuredSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <security xmlns="urn:security">
+ <spec:ejb-name>ConfidentialSLSB</spec:ejb-name>
+ <security-domain>JBossWS</security-domain>
+ </security>
+ <spec:security-role>
+ <spec:role-name>friend</spec:role-name>
+ </spec:security-role>
+ </spec:assembly-descriptor>
+
+</jboss:jboss>
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/application-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -8,7 +8,7 @@
<display-name>JAXRPC simple tests</display-name>
<service-ref>
- <service-ref-name>service1</service-ref-name>
+ <service-ref-name>java:jboss/exported/service1</service-ref-name>
<service-interface>javax.xml.rpc.Service</service-interface>
<wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
@@ -18,7 +18,7 @@
</service-ref>
<service-ref>
- <service-ref-name>service2</service-ref-name>
+ <service-ref-name>java:jboss/exported/service2</service-ref-name>
<service-interface>org.jboss.test.ws.jaxrpc.samples.serviceref.TestEndpointService</service-interface>
<wsdl-file>META-INF/wsdl/TestEndpoint.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/serviceref/META-INF/jboss-client.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!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>
-</jboss-client>
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-02-27 14:15:17 UTC (rev 15760)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-02-27 15:07:39 UTC (rev 15761)
@@ -1135,7 +1135,6 @@
<testExcludes>
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
<exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
</testExcludes>
</configuration>
<goals>
@@ -1174,18 +1173,10 @@
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher -->
<exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- # TODO: appclient -->
- <exclude>org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase*</exclude>
-
- <!-- # TODO: remote JNDI support (non EJB objects) -->
- <exclude>org/jboss/test/ws/jaxrpc/samples/secureejb/**</exclude>
-
<!-- # [JBWS-3234] JNDI over RMI not available on AS7 -->
<exclude>org/jboss/test/ws/jaxws/wsaddressing/replyto/**</exclude>
@@ -1201,7 +1192,6 @@
<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/jbws1010/JBWS1010TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/jbws1107/JBWS1107TestCase*</exclude>
12 years, 9 months
JBossWS SVN: r15760 - in stack/native/branches/jbossws-native-4.0.x: modules/dist/src/main/scripts and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 09:15:17 -0500 (Mon, 27 Feb 2012)
New Revision: 15760
Added:
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15749,15759 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r15749 | ropalka | 2012-02-27 10:25:03 +0100 (Mon, 27 Feb 2012) | 1 line
sync. with AS7 upstream
.......
r15759 | ropalka | 2012-02-27 15:09:19 +0100 (Mon, 27 Feb 2012) | 1 line
[JBWS-3435] update bin distro to be able to execute appclient tests too
.......
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
+ /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
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 14:09:19 UTC (rev 15759)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 14:15:17 UTC (rev 15760)
@@ -104,6 +104,7 @@
<include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
+ <include>java/org/jboss/test/ws/appclient/**</include>
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>java/org/jboss/test/ws/saaj/**</include>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java 2012-02-27 14:09:19 UTC (rev 15759)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java 2012-02-27 14:15:17 UTC (rev 15760)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.test.ws.appclient;
-
-import java.io.File;
-
-/**
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class AppclientKiller
-{
-
- private final static int MAX_COUNT_OF_ATTEMTS = 600;
-
- public static void main(final String[] args) throws Exception {
- if (args.length != 1) {
- throw new RuntimeException("shutdown mark file name missing");
- }
- final File shutdownMarkFile = new File(args[0]);
- int countOfAttempts = 0;
- while (!shutdownMarkFile.exists()) {
- countOfAttempts++;
- Thread.sleep(100);
- if (countOfAttempts == MAX_COUNT_OF_ATTEMTS) {
- System.out.println("appclient timeout");
- break;
- }
- }
- System.exit(1);
- }
-
-}
Copied: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java (from rev 15759, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java)
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java (rev 0)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java 2012-02-27 14:15:17 UTC (rev 15760)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.appclient;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class AppclientKiller
+{
+
+ private final static int MAX_COUNT_OF_ATTEMTS = 600;
+
+ public static void main(final String[] args) throws Exception {
+ if (args.length != 1) {
+ throw new RuntimeException("shutdown mark file name missing");
+ }
+ final File shutdownMarkFile = new File(args[0]);
+ int countOfAttempts = 0;
+ while (!shutdownMarkFile.exists()) {
+ countOfAttempts++;
+ Thread.sleep(100);
+ if (countOfAttempts == MAX_COUNT_OF_ATTEMTS) {
+ System.out.println("appclient timeout");
+ break;
+ }
+ }
+ System.exit(1);
+ }
+
+}
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-27 14:09:19 UTC (rev 15759)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-02-27 14:15:17 UTC (rev 15760)
@@ -1065,7 +1065,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.2.Final</version>
+ <version>1.0.3.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.remoting3</groupId>
@@ -1110,13 +1110,13 @@
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>remoting-jmx</artifactId>
- <version>1.0.0.Final</version>
+ <version>1.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>3.2.1.GA</version>
+ <version>3.2.2.GA</version>
<scope>test</scope>
</dependency>
</dependencies>
12 years, 9 months
JBossWS SVN: r15759 - in stack/native/trunk/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 09:09:19 -0500 (Mon, 27 Feb 2012)
New Revision: 15759
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
Modified:
stack/native/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-3435] update bin distro to be able to execute appclient tests too
Modified: stack/native/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/native/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 14:02:23 UTC (rev 15758)
+++ stack/native/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 14:09:19 UTC (rev 15759)
@@ -104,6 +104,7 @@
<include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
+ <include>java/org/jboss/test/ws/appclient/**</include>
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>java/org/jboss/test/ws/saaj/**</include>
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java 2012-02-27 14:09:19 UTC (rev 15759)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.appclient;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class AppclientKiller
+{
+
+ private final static int MAX_COUNT_OF_ATTEMTS = 600;
+
+ public static void main(final String[] args) throws Exception {
+ if (args.length != 1) {
+ throw new RuntimeException("shutdown mark file name missing");
+ }
+ final File shutdownMarkFile = new File(args[0]);
+ int countOfAttempts = 0;
+ while (!shutdownMarkFile.exists()) {
+ countOfAttempts++;
+ Thread.sleep(100);
+ if (countOfAttempts == MAX_COUNT_OF_ATTEMTS) {
+ System.out.println("appclient timeout");
+ break;
+ }
+ }
+ System.exit(1);
+ }
+
+}
12 years, 9 months
JBossWS SVN: r15758 - in stack/cxf/branches/jbossws-cxf-4.0.x: modules/dist/src/main/scripts and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 09:02:23 -0500 (Mon, 27 Feb 2012)
New Revision: 15758
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml
Log:
Merged revisions 15750,15754,15757 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r15750 | ropalka | 2012-02-27 10:37:06 +0100 (Mon, 27 Feb 2012) | 1 line
sync. with AS7 upstream
.......
r15754 | ropalka | 2012-02-27 13:39:55 +0100 (Mon, 27 Feb 2012) | 1 line
[JBWS-3444] properly teardown initial context to cleanup caches
.......
r15757 | ropalka | 2012-02-27 14:56:16 +0100 (Mon, 27 Feb 2012) | 1 line
[JBWS-3435] fix appclient tests in bin distro too
.......
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,15751
+ /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
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 13:56:16 UTC (rev 15757)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 14:02:23 UTC (rev 15758)
@@ -120,6 +120,7 @@
<include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
+ <include>java/org/jboss/test/ws/appclient/**</include>
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>java/org/jboss/test/ws/saaj/**</include>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2012-02-27 13:56:16 UTC (rev 15757)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2012-02-27 14:02:23 UTC (rev 15758)
@@ -45,10 +45,11 @@
public void testSingleDeploy() throws Exception
{
deploy("jaxws-cxf-bus-ejb3-client.jar");
+ InitialContext iniCtx = null;
try
{
String host = getServerHost();
- InitialContext iniCtx = getInitialContext();
+ iniCtx = getServerInitialContext();
Object obj = iniCtx.lookup("ejb:/jaxws-cxf-bus-ejb3-client//EJB3Client!" + EJB3ClientRemoteInterface.class.getName());
EJB3ClientRemoteInterface ejb3Remote = (EJB3ClientRemoteInterface)obj;
ejb3Remote.testBusCreation();
@@ -60,6 +61,10 @@
}
finally
{
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
undeploy("jaxws-cxf-bus-ejb3-client.jar");
}
}
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-27 13:56:16 UTC (rev 15757)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml 2012-02-27 14:02:23 UTC (rev 15758)
@@ -1165,7 +1165,7 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-ejb-client</artifactId>
- <version>1.0.2.Final</version>
+ <version>1.0.3.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.remoting3</groupId>
@@ -1251,13 +1251,13 @@
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>remoting-jmx</artifactId>
- <version>1.0.0.Final</version>
+ <version>1.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.remoting3</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>3.2.1.GA</version>
+ <version>3.2.2.GA</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -1328,9 +1328,6 @@
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
- <!-- # [JBWS-3444] WebServiceRefClientTestCase causes Hudson job to hang -->
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
-
<!-- # TODO: JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
</excludes>
12 years, 9 months
JBossWS SVN: r15757 - stack/cxf/trunk/modules/dist/src/main/scripts.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 08:56:16 -0500 (Mon, 27 Feb 2012)
New Revision: 15757
Modified:
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
Log:
[JBWS-3435] fix appclient tests in bin distro too
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 13:36:44 UTC (rev 15756)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-bin-dist.xml 2012-02-27 13:56:16 UTC (rev 15757)
@@ -120,6 +120,7 @@
<include>java/org/jboss/test/ws/jaxrpc/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/samples/**</include>
<include>java/org/jboss/test/ws/jaxws/smoke/**</include>
+ <include>java/org/jboss/test/ws/appclient/**</include>
<include>java/org/jboss/test/ws/management/**</include>
<include>java/org/jboss/test/ws/projectGenerator/**</include>
<include>java/org/jboss/test/ws/saaj/**</include>
12 years, 9 months
JBossWS SVN: r15756 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/ws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 08:36:44 -0500 (Mon, 27 Feb 2012)
New Revision: 15756
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/appclient/
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxrpc.xml
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
Log:
[JBWS-3435] moving AppclientKiller to test sources
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxrpc.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxrpc.xml 2012-02-27 13:34:36 UTC (rev 15755)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxrpc.xml 2012-02-27 13:36:44 UTC (rev 15756)
@@ -427,10 +427,10 @@
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationHome.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationRemote.class"/>
+ <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
</fileset>
<manifest>
- <attribute name="main-class" value="org.jboss.ws.common.appclient.AppclientKiller"/>
- <attribute name="Dependencies" value="org.jboss.ws.common"/>
+ <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
</manifest>
<metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/secureejb/META-INF">
<include name="application-client.xml"/>
@@ -463,10 +463,10 @@
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
<include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
</fileset>
<manifest>
- <attribute name="main-class" value="org.jboss.ws.common.appclient.AppclientKiller"/>
- <attribute name="Dependencies" value="org.jboss.ws.common"/>
+ <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
</manifest>
<metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/META-INF">
<include name="application-client.xml"/>
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-02-27 13:34:36 UTC (rev 15755)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-02-27 13:36:44 UTC (rev 15756)
@@ -286,11 +286,11 @@
<include name="org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/Endpoint.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.ws.common.appclient.AppclientKiller"/>
- <attribute name="Dependencies" value="org.jboss.ws.common"/>
- </manifest>
+ <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/jaxws/samples/serviceref/META-INF">
<include name="application-client.xml"/>
<include name="wsdl/**"/>
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/appclient/AppclientKiller.java 2012-02-27 13:36:44 UTC (rev 15756)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.appclient;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class AppclientKiller
+{
+
+ private final static int MAX_COUNT_OF_ATTEMTS = 600;
+
+ public static void main(final String[] args) throws Exception {
+ if (args.length != 1) {
+ throw new RuntimeException("shutdown mark file name missing");
+ }
+ final File shutdownMarkFile = new File(args[0]);
+ int countOfAttempts = 0;
+ while (!shutdownMarkFile.exists()) {
+ countOfAttempts++;
+ Thread.sleep(100);
+ if (countOfAttempts == MAX_COUNT_OF_ATTEMTS) {
+ System.out.println("appclient timeout");
+ break;
+ }
+ }
+ System.exit(1);
+ }
+
+}
12 years, 9 months
JBossWS SVN: r15754 - in stack/cxf/trunk/modules/testsuite: cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 07:39:55 -0500 (Mon, 27 Feb 2012)
New Revision: 15754
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3444] properly teardown initial context to cleanup caches
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2012-02-27 12:39:55 UTC (rev 15754)
@@ -45,10 +45,11 @@
public void testSingleDeploy() throws Exception
{
deploy("jaxws-cxf-bus-ejb3-client.jar");
+ InitialContext iniCtx = null;
try
{
String host = getServerHost();
- InitialContext iniCtx = getInitialContext();
+ iniCtx = getServerInitialContext();
Object obj = iniCtx.lookup("ejb:/jaxws-cxf-bus-ejb3-client//EJB3Client!" + EJB3ClientRemoteInterface.class.getName());
EJB3ClientRemoteInterface ejb3Remote = (EJB3ClientRemoteInterface)obj;
ejb3Remote.testBusCreation();
@@ -60,6 +61,10 @@
}
finally
{
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
undeploy("jaxws-cxf-bus-ejb3-client.jar");
}
}
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-27 12:36:04 UTC (rev 15753)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-27 12:39:55 UTC (rev 15754)
@@ -1331,9 +1331,6 @@
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
- <!-- # [JBWS-3444] WebServiceRefClientTestCase causes Hudson job to hang -->
- <exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
-
<!-- # TODO: JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
</excludes>
12 years, 9 months
JBossWS SVN: r15753 - in shared-testsuite/trunk: testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-27 07:36:04 -0500 (Mon, 27 Feb 2012)
New Revision: 15753
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
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/jbws1841/JBWS1841TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
Log:
[JBWS-3444] properly teardown initial context to cleanup caches
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -292,19 +292,19 @@
return env;
}
- /** Get the appclient remote env context
+ /** Gets the appclient remote env context.
+ * Every test calling this method have to ensure InitialContext.close()
+ * method is called at end of test to clean up all associated caches.
*/
protected static InitialContext getAppclientInitialContext() throws NamingException, IOException
{
-// InitialContext iniCtx = new InitialContext();
-// Hashtable env = iniCtx.getEnvironment();
-// env.put(Context.PROVIDER_URL, "remote://" + JBossWSTestHelper.getServerHost() + ":4448");
-// return new InitialContext(env);
final Hashtable<String, String> env = getEnvironment("appclient.jndi.properties");
return new InitialContext(env);
}
/** Get the server remote env context
+ * Every test calling this method have to ensure InitialContext.close()
+ * method is called at end of test to clean up all associated caches.
*/
protected static InitialContext getServerInitialContext() throws NamingException, IOException
{
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -43,16 +43,32 @@
{
public static final String USERNAME = "kermit";
public static final String PASSWORD = "thefrog";
+ private InitialContext appclientCtx;
public static Test suite() throws Exception
{
return new JBossWSTestSetup(SecureEJBTestCase.class, "jaxrpc-samples-secureejb.jar, jaxrpc-samples-secureejb-appclient.ear#jaxrpc-samples-secureejb-appclient.jar", true);
}
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ appclientCtx = getAppclientInitialContext();
+ }
+
+ public void tearDown() throws Exception
+ {
+ if (appclientCtx != null)
+ {
+ appclientCtx.close();
+ appclientCtx = null;
+ }
+ super.tearDown();
+ }
+
public void testRoleSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getAppclientInitialContext();
- Service service = (Service)iniCtx.lookup("java:service/RoleSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/RoleSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "RoleSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -76,8 +92,7 @@
public void testBasicSecuredServiceAccess() throws Exception
{
- InitialContext iniCtx = getAppclientInitialContext();
- Service service = (Service)iniCtx.lookup("java:service/BasicSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/BasicSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "BasicSecuredPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
@@ -101,8 +116,7 @@
public void testConfidentialServiceAccess() throws Exception
{
- InitialContext iniCtx = getAppclientInitialContext();
- Service service = (Service)iniCtx.lookup("java:service/ConfidentialSecured");
+ Service service = (Service)appclientCtx.lookup("java:service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "ConfidentialPort");
OrganizationService port = (OrganizationService)service.getPort(portName, OrganizationService.class);
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -71,13 +71,24 @@
public void testApplicationClient() throws Exception
{
- final InitialContext ctx = getAppclientInitialContext();
- final TestEndpoint port1 = (TestEndpoint)((Service)ctx.lookup("java:service1")).getPort(TestEndpoint.class);
- final TestEndpoint port2 = ((TestEndpointService)ctx.lookup("java:service2")).getTestEndpointPort();
- final String msg = "Hello World!";
+ InitialContext ctx = null;
+ try
+ {
+ ctx = getAppclientInitialContext();
+ final TestEndpoint port1 = (TestEndpoint)((Service)ctx.lookup("java:service1")).getPort(TestEndpoint.class);
+ final TestEndpoint port2 = ((TestEndpointService)ctx.lookup("java:service2")).getTestEndpointPort();
+ final String msg = "Hello World!";
- assertEquals(msg, port1.echo(msg));
- assertEquals(msg, port2.echo(msg));
+ assertEquals(msg, port1.echo(msg));
+ assertEquals(msg, port2.echo(msg));
+ }
+ finally
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ }
+ }
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxrpc/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -21,13 +21,7 @@
*/
package org.jboss.test.ws.jaxrpc.samples.serviceref;
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
import junit.framework.Test;
@@ -51,12 +45,23 @@
public void testEJBClient() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
- EJBRemote ejbRemote = ejbHome.create();
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("ejb:/jaxrpc-samples-serviceref-ejbclient//EJBClient!" + EJBRemoteHome.class.getName());
+ EJBRemote ejbRemote = ejbHome.create();
- String helloWorld = "Hello World!";
- Object retObj = ejbRemote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello World!";
+ Object retObj = ejbRemote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
}
Modified: 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-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -23,6 +23,7 @@
import java.net.URL;
+import javax.naming.InitialContext;
import javax.wsdl.Definition;
import javax.wsdl.factory.WSDLFactory;
@@ -55,8 +56,20 @@
public void testEJBVehicle() throws Exception
{
- EJB3Remote remote = (EJB3Remote)getInitialContext().lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
+ 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();
+ }
+ }
}
}
Modified: 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-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -23,6 +23,7 @@
import java.net.URL;
+import javax.naming.InitialContext;
import javax.wsdl.Definition;
import javax.wsdl.factory.WSDLFactory;
@@ -55,8 +56,20 @@
public void testEJBVehicle() throws Exception
{
- EJB3Remote remote = (EJB3Remote)getInitialContext().lookup("ejb:/jaxws-jbws1581-ejb3//EJB3Bean!" + EJB3Remote.class.getName());
- String retStr = remote.runTest("Hello World!");
- assertEquals("Hello World!", retStr);
+ 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();
+ }
+ }
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -43,7 +43,7 @@
private static EndpointInterface port;
private static StatelessRemote remote;
-
+ private static InitialContext ctx;
public static Test suite()
{
return new JBossWSTestSetup(JBWS1841TestCase.class, "jaxws-jbws1841.jar");
@@ -57,11 +57,20 @@
QName serviceName = new QName("http://www.openuri.org/2004/04/HelloWorld", "EndpointService");
port = Service.create(wsdlURL, serviceName).getPort(EndpointInterface.class);
- InitialContext ctx = getInitialContext();
+ ctx = getServerInitialContext();
remote = (StatelessRemote)ctx.lookup("ejb:/jaxws-jbws1841//" + StatelessBean.class.getSimpleName() + "!" + StatelessRemote.class.getName());
}
}
+ protected void tearDown() throws Exception
+ {
+ if (ctx != null)
+ {
+ ctx.close();
+ ctx = null;
+ }
+ }
+
public void testDirectWSInvocation() throws Exception
{
String result = port.echo("DirectWSInvocation");
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -56,26 +56,46 @@
public void testRemoteAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJB3RemoteBusinessInterface ejb3Remote = (EJB3RemoteBusinessInterface)iniCtx.lookup("ejb:/jaxws-jbws944//FooBean01!" + EJB3RemoteBusinessInterface.class.getName());
+ InitialContext iniCtx = null;
+ try {
+ iniCtx = getServerInitialContext();
+ EJB3RemoteBusinessInterface ejb3Remote = (EJB3RemoteBusinessInterface)iniCtx.lookup("ejb:/jaxws-jbws944//FooBean01!" + EJB3RemoteBusinessInterface.class.getName());
- String helloWorld = "Hello world!";
- Object retObj = ejb3Remote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello world!";
+ Object retObj = ejb3Remote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
// This tests whether the remote proxy also implements
// the home interface and that it can be narrowed to it.
public void testNarrowedRemoteAccess() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- Object obj = iniCtx.lookup("ejb:/jaxws-jbws944//FooBean01!" + EJB3RemoteHome.class.getName());
- EJB3RemoteHome ejb3Home = (EJB3RemoteHome)PortableRemoteObject.narrow(obj, EJB3RemoteHome.class);
- EJB3RemoteInterface ejb3Remote = ejb3Home.create();
+ InitialContext iniCtx = null;
+ try {
+ iniCtx = getServerInitialContext();
+ Object obj = iniCtx.lookup("ejb:/jaxws-jbws944//FooBean01!" + EJB3RemoteHome.class.getName());
+ EJB3RemoteHome ejb3Home = (EJB3RemoteHome)PortableRemoteObject.narrow(obj, EJB3RemoteHome.class);
+ EJB3RemoteInterface ejb3Remote = ejb3Home.create();
- String helloWorld = "Hello world!";
- Object retObj = ejb3Remote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello world!";
+ Object retObj = ejb3Remote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
public void testWebService() throws Exception
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -73,26 +73,36 @@
public void testApplicationClient() throws Exception
{
- InitialContext iniCtx = getAppclientInitialContext();
- Service service = (Service) iniCtx.lookup("java:service2");
- Endpoint port = service.getPort(Endpoint.class);
- assertNotNull(port);
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getAppclientInitialContext();
+ Service service = (Service) iniCtx.lookup("java:service2");
+ Endpoint port = service.getPort(Endpoint.class);
+ assertNotNull(port);
- if(isIntegrationNative())
- {
- BindingProvider bp = (BindingProvider)port;
- boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
- assertTrue("MTOM should be enabled on port", mtomEnabled);
+ if(isIntegrationNative())
+ {
+ BindingProvider bp = (BindingProvider)port;
+ boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+ assertTrue("MTOM should be enabled on port", mtomEnabled);
+ }
+ else
+ {
+ // MTOM property at service-ref level not possible with sun-ri
+ }
+
+ String request = "ApplicationClient";
+ String response = port.echo(request);
+ assertEquals(response, request);
}
- else
+ finally
{
- // MTOM property at service-ref level not possible with sun-ri
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
}
-
- String request = "ApplicationClient";
- String response = port.echo(request);
- assertEquals(response, request);
-
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -72,12 +72,23 @@
public void testEJBClient() throws Exception
{
- InitialContext iniCtx = getInitialContext();
- EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("ejb:/jaxws-samples-serviceref-ejbclient//EJBClient!" + EJBRemote.class.getName());
+ InitialContext iniCtx = null;
+ try
+ {
+ iniCtx = getServerInitialContext();
+ EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("ejb:/jaxws-samples-serviceref-ejbclient//EJBClient!" + EJBRemote.class.getName());
- String helloWorld = "Hello World!";
- Object retObj = ejbRemote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ String helloWorld = "Hello World!";
+ Object retObj = ejbRemote.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ }
+ finally
+ {
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
+ }
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java 2012-02-27 10:48:47 UTC (rev 15752)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java 2012-02-27 12:36:04 UTC (rev 15753)
@@ -62,10 +62,11 @@
public void testEJB3Client() throws Exception
{
+ InitialContext iniCtx = null;
deploy("jaxws-samples-webserviceref-ejb3-client.jar");
try
{
- InitialContext iniCtx = getInitialContext();
+ iniCtx = getServerInitialContext();
EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("ejb:/jaxws-samples-webserviceref-ejb3-client//EJB3Client!" + EJB3Remote.class.getName());
String helloWorld = "Hello World!";
@@ -74,6 +75,10 @@
}
finally
{
+ if (iniCtx != null)
+ {
+ iniCtx.close();
+ }
undeploy("jaxws-samples-webserviceref-ejb3-client.jar");
}
}
12 years, 9 months