diff --git a/appclient/pom.xml b/appclient/pom.xml
index e7fd0d1b73..41f3b1d7e9 100644
--- a/appclient/pom.xml
+++ b/appclient/pom.xml
@@ -98,27 +98,6 @@
true
-
- com.sun.xml.ws
- jaxws-maven-plugin
-
-
- hello-service-testapp
-
- wsimport
-
- generate-sources
-
- ${project.basedir}/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/
-
- HelloService.wsdl
-
- com.sun.ts.tests.appclient.deploy.metadatacomplete.testapp
- ${project.build.directory}/generated-sources/
-
-
-
-
diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloImpl.java b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloImpl.java
deleted file mode 100644
index 1e0d3e3482..0000000000
--- a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2017, 2018, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.appclient.deploy.metadatacomplete.testapp;
-
-import jakarta.ejb.Stateless;
-import jakarta.jws.WebService;
-
-@WebService(name = "Hello", serviceName = "HelloService")
-@Stateless
-public class HelloImpl {
-
- public String sayHello(String param) {
- return "Hello " + param;
- }
-}
diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService.wsdl b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService.wsdl
deleted file mode 100644
index 4574512c34..0000000000
--- a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService.wsdl
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService_schema1.xsd b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService_schema1.xsd
deleted file mode 100644
index 9b91fe7873..0000000000
--- a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/HelloService_schema1.xsd
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/TestAppClient.java b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/TestAppClient.java
index 7c940f3c9b..7ffd84a548 100644
--- a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/TestAppClient.java
+++ b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/TestAppClient.java
@@ -38,7 +38,6 @@
import jakarta.mail.Session;
import jakarta.persistence.EntityManagerFactory;
import jakarta.persistence.PersistenceUnit;
-import jakarta.xml.ws.WebServiceRef;
@MailSessionDefinition(name = "java:comp/myMailSession", host = "smtp.gmail.com", transportProtocol = "smtps", properties = {
"mail.debug=true" })
@@ -63,9 +62,6 @@ public class TestAppClient extends EETest {
@EJB
static DataStoreRemote dataStore;
- @WebServiceRef(name = "service/HelloService")
- static HelloService service;
-
@Resource(lookup = "java:app/jms/TestConnectionFactory")
private static ConnectionFactory testFac;
@@ -229,32 +225,6 @@ public void testEJBAnnotation() throws Exception {
}
}
- /**
- * @testName: testWebServiceRefAnnotation
- *
- * @assertion_ids: JavaEE:SPEC:323
- *
- * @test_Strategy:
- *
- * We check that:
- *
- * - When the meta-data complete attribute is set to
- * true,WebServiceRef annotation should be ignored - as it is
- * one of the annotations to which metadata-complete is
- * applicable.
- *
- */
- public void testWebServiceRefAnnotation() throws Exception {
- try {
- logMsg("service" + service);
- if (null != service) {
- throw new Exception("WebServiceRefAnnotation test failed!");
- }
- } catch (Exception e) {
- throw new Exception("WebServiceRefAnnotation test failed: " + e, e);
- }
- }
-
/**
* @testName: testDataSourceDefinitionAnnotation
*
diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/files/TestAppClient.java.src b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/files/TestAppClient.java.src
index 9d270902f0..e6a9f25821 100644
--- a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/files/TestAppClient.java.src
+++ b/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/files/TestAppClient.java.src
@@ -30,7 +30,6 @@ import com.sun.javatest.Status;
import jakarta.mail.Session;
import jakarta.mail.MailSessionDefinition;
import jakarta.ejb.EJB;
-import jakarta.xml.ws.WebServiceRef;
import jakarta.annotation.sql.DataSourceDefinition;
import jakarta.jms.JMSConnectionFactoryDefinition;
import jakarta.jms.JMSDestinationDefinition;
@@ -76,8 +75,6 @@ public class TestAppClient extends EETest
private static Session session;
@EJB
static DataStoreRemote dataStore;
- @WebServiceRef(name="service/HelloService")
- static HelloService service;
@Resource(lookup="java:app/jms/TestConnectionFactory")
private static ConnectionFactory testFac;
@Resource(lookup="java:app/jms/TestQ")
@@ -268,36 +265,6 @@ public class TestAppClient extends EETest
}
}
- /**
- * @testName: testWebServiceRefAnnotation
- *
- * @assertion_ids: JavaEE:SPEC:323
- *
- * @test_Strategy:
- *
- * We check that:
- *
- * - When the meta-data complete attribute is set to true,WebServiceRef annotation should be ignored
- * - as it is one of the annotations to which metadat-complete is applicable.
- *
- */
- public void testWebServiceRefAnnotation() throws Exception {
-
- try {
-
-
- //logMsg("datastore"+dataStore);
- logMsg("service"+service);
- if(null != service){
- throw new Exception("WebServiceRefAnnotation test failed!");
- }
-
- }
- catch (Exception e) {
- throw new Exception("WebServiceRefAnnotation test failed: " + e, e);
- }
- }
-
/**
* @testName: testDataSourceDefinitionAnnotation
*
diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java
index 322d4a0d62..dfaa49c6c5 100644
--- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java
+++ b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java
@@ -31,7 +31,6 @@
import jakarta.resource.spi.BootstrapContext;
import jakarta.resource.spi.work.WorkManager;
-import jakarta.xml.ws.WebServicePermission;
public class PermissionDDWorkManager {
private BootstrapContext bsc = null;
@@ -53,13 +52,8 @@ public PermissionDDWorkManager(BootstrapContext val) {
public void runTests() {
debug("enterred runTests");
- validateCustomPerm();
- validateCustomPermFromAppServer();
- validateLocalGrantForCustomPerm();
validateRequiredPermSet();
- validateMissingPermFails();
validateRestrictedLocalPerm();
- validateLocalPermsInvalidName();
// doWork();
// doTCWork();
@@ -67,92 +61,6 @@ public void runTests() {
debug("leaving runTests");
}
- public void validateCustomPerm() {
- try {
- // call a priviledged method
- WebServicePermission perm = new WebServicePermission(
- "CTSPermission1_name");
- doCheckPermission(perm);
-
- // we have perms so should get here
- debug("validateCustomPerm(): CTSPermission1_name permission okay");
- ConnectorStatus.getConnectorStatus()
- .logState("SUCCESS: validateCustomPerm passed.");
- } catch (AccessControlException ex) {
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateCustomPerm(), throwing AccessControlException.");
- debug(
- "FAILURE: CTSPermission1_name perm missing, throwing AccessControlException.");
- Debug.printDebugStack(ex);
- } catch (Exception ex) {
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateCustomPerm(), throwing unexpected Exception.");
- Debug.printDebugStack(ex);
- }
-
- return;
- }
-
- public void validateCustomPermFromAppServer() {
- try {
- // call a priviledged method
- WebServicePermission perm = new WebServicePermission(
- "ConnectorPermission1_name2");
- doCheckPermission(perm);
-
- // we have perms set from within appserver as part of initial config
- // and even though we did not set anything in our permissions.xml for
- // ConnectorPermission1_name2, we should still make it here.
- debug(
- "validateCustomPermFromAppServer(): ConnectorPermission1_name2 permission okay");
- ConnectorStatus.getConnectorStatus()
- .logState("SUCCESS: validateCustomPermFromAppServer passed.");
- } catch (AccessControlException ex) {
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateCustomPermFromAppServer(), throwing AccessControlException.");
- debug(
- "FAILURE: ConnectorPermission1_name2 perm missing, throwing AccessControlException.");
- Debug.printDebugStack(ex);
- } catch (Exception ex) {
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateCustomPermFromAppServer(), throwing unexpected Exception.");
- Debug.printDebugStack(ex);
- }
-
- return;
- }
-
- public void validateLocalGrantForCustomPerm() {
- try {
- // call a priviledged method
- WebServicePermission perm = new WebServicePermission(
- "CTSPermission2_name");
- doCheckPermission(perm);
-
- // we have locally defined grant/perms (thru permissions.xml) so we should
- // get here
- debug(
- "validateLocalGrantForCustomPerm(): CTSPermission2_name permission property granted AccessControlException.");
- ConnectorStatus.getConnectorStatus()
- .logState("SUCCESS: validateLocalGrantForCustomPerm passed.");
- } catch (AccessControlException ex) {
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateLocalGrantForCustomPerm(), throwing AccessControlException.");
- debug(
- "FAILURE: CTSPermission2_name perm missing, throwing AccessControlException.");
- Debug.printDebugStack(ex);
- } catch (Exception ex) {
- debug(
- "FAILURE: validateLocalGrantForCustomPerm(), throwing unexpected Exception.");
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateLocalGrantForCustomPerm(), throwing unexpected Exception.");
- Debug.printDebugStack(ex);
- }
-
- debug("returning from validateLocalGrantForCustomPerm()");
- return;
- }
-
public void validateRequiredPermSet() {
try {
RuntimePermission rtperm = new RuntimePermission("loadLibrary.*");
@@ -198,35 +106,6 @@ public void validateRequiredPermSet() {
return;
}
- public void validateMissingPermFails() {
- try {
- // call a non-priviledged method
- WebServicePermission perm = new WebServicePermission(
- "CTSPermission3_name");
- doCheckPermission(perm);
-
- // we do NOT have perms for this perm with name "CTSPermission3_name" so
- // should NOT get here
- ConnectorStatus.getConnectorStatus()
- .logState("FAILURE: CTSPermission3_name permission okay");
- } catch (AccessControlException ex) {
- debug("SUCCESS: CTSPermission3_name doesnt exist and was caught.");
- ConnectorStatus.getConnectorStatus().logState(
- "SUCCESS: CTSPermission3_name doesnt exist and was caught.");
- ConnectorStatus.getConnectorStatus()
- .logState("SUCCESS: validateMissingPermFails passed.");
- Debug.printDebugStack(ex);
- } catch (Exception ex) {
- debug("FAILURE: validateMissingPermFails threw unexpected exception.");
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateMissingPermFails threw unexpected exception.");
- Debug.printDebugStack(ex);
- }
-
- debug("returning from validateMissingPermFails()");
- return;
- }
-
public void validateRestrictedLocalPerm() {
try {
// call a priviledged method
@@ -262,71 +141,6 @@ public void validateRestrictedLocalPerm() {
return;
}
- public void validateLocalPermsInvalidName() {
- try {
- // call a priviledged method that does not exist
- WebServicePermission secPerm = new WebServicePermission(
- "NonExistingName");
-
- try {
- doCheckPermission(secPerm);
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName() did not throw expected AccessControlException.");
- ConnectorStatus.getConnectorStatus()
- .logState("FAILURE: validateLocalPermsInvalidName().");
- return;
- } catch (AccessControlException ex) {
- // should get here.
- ConnectorStatus.getConnectorStatus().logState(
- "SUCCESS: validateLocalPermsInvalidName() threw expected AccessControlException");
- }
- // next call a priviledged method that does exist
- try {
- // call a priviledged method - that exists only in permissions.xml
- WebServicePermission perm = new WebServicePermission(
- "CTSPermission_second_name");
- doCheckPermission(perm);
-
- // should get here.
- // we have locally defined grant/perms (thru permissions.xml) so we
- // should get here
- debug(
- "CTSPermission_second_name permission property granted AccessControlException.");
- } catch (AccessControlException ex) {
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName() threw unexpected exception.");
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateLocalPermsInvalidName() threw unexpected exception.");
- Debug.printDebugStack(ex);
- return;
- } catch (Exception ex) {
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName had unexpeted exception.");
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateLocalPermsInvalidName had unexpeted exception.");
- Debug.printDebugStack(ex);
- return;
- }
-
- debug("SUCCESS: validateLocalPermsInvalidName passed.");
- ConnectorStatus.getConnectorStatus()
- .logState("SUCCESS: validateLocalPermsInvalidName passed.");
-
- } catch (Exception ex) {
- debug(
- "FAILURE: validateLocalPermsInvalidName had unexpected exception.");
- ConnectorStatus.getConnectorStatus().logState(
- "FAILURE: validateLocalPermsInvalidName had unexpected exception.");
- ex.printStackTrace();
- }
-
- debug("returning from validateLocalPermsInvalidName()");
- return;
- }
-
public void doCheckPermission(Permission pp) throws Exception {
final Permission perm = pp;
AccessController.doPrivileged(new PrivilegedExceptionAction() {
diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java b/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java
index 5de80f5dbf..fbf34f6d76 100644
--- a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java
+++ b/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java
@@ -143,129 +143,6 @@ public void testValidateCustomPerm() throws Exception {
}
- /*
- * The test is commented as this test case is not supported by Java EE
- * Platform Specification
- *
- * testName: testValidateCustomPermFromAppServer
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:293; JavaEE:SPEC:295;
- * JavaEE:SPEC:304;
- *
- * @test_Strategy: This is basically testing that when a permission is set
- * within the app server but NOT listed/set within the permissions.xml, our
- * deployed app will still be granted that permission. Thus omitting it from
- * the permissions.xml must not cause the permission to be denied.
- *
- * This validates that we have a particular grant under the following
- * conditions: - this is testing permissions.xml within a Servlet - using a
- * custom Permission defined wihtin app server (via initial config) (note:
- * this custom perm is CTSPermission1 named "ConnectorPermission1_name2") -
- * have NO declared grant for this (CTSPermission1_name2) in permissions.xml -
- * since the perm IS defined within the appserver but is not defined within
- * the local permissions.xml, the app componets must still have permission as
- * set within app server.
- *
- */
- public void testValidateCustomPermFromAppServer() throws Exception {
- Vector log = null;
- boolean b1 = false;
-
- // test that whitebox-permissiondd logs the following message
- String toCheck1 = "SUCCESS: validateCustomPermFromAppServer passed.";
-
- // Get connection object using no parameters. Container managed
- // signon.
- try {
- ds1.setLogFlag(true);
- con = ds1.getConnection();
- log = ds1.getStateLog();
- TestUtil.logMsg("Got connection and log for whitebox-permissiondd.");
- } catch (Exception e) {
- TestUtil.logMsg("Exception caught on creating connection.");
- throw new Exception(e.getMessage(), e);
- }
-
- // Turn tracing on if you want to see the log contents
- TestUtil.logTrace(log.toString());
-
- for (int i = 0; i < log.size(); i++) {
- String str = (String) log.elementAt(i);
- if (str.startsWith(toCheck1)) {
- b1 = true;
- break;
- }
- }
-
- if (b1) {
- TestUtil.logMsg("testValidateCustomPermFromAppServer PASSED.");
- } else {
- if (!b1) {
- TestUtil.logMsg(
- "Failures can occur if you are not running with Security Manager enabled in your appserver.");
- throw new Exception("testValidateCustomPermFromAppServer FAILED.");
- }
- }
- }
-
- /*
- * @testName: testValidateLocalGrantForCustomPerm
- *
- * @assertion_ids: JavaEE:SPEC:292; JavaEE:SPEC:293; JavaEE:SPEC:303;
- * JavaEE:SPEC:304;
- *
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - this is testing permissions.xml within a Servlet -
- * using locally declared custom Permission (CTSPermission2) declared for
- * property "CTSPermission2_name"; note: CTSPermission2 does NOT have support
- * for actions. - have declared grant in permissions.xml - have NO declared
- * grant at higher app server level (e.g. server.policy etc) We should be
- * allowed access control.
- *
- */
- public void testValidateLocalGrantForCustomPerm() throws Exception {
- Vector log = null;
- boolean b1 = false;
-
- // test that whitebox-permissiondd logs the following message
- String toCheck1 = "SUCCESS: validateLocalGrantForCustomPerm passed.";
-
- // Get connection object using no parameters. Container managed
- // signon.
- try {
- ds1.setLogFlag(true);
- con = ds1.getConnection();
- log = ds1.getStateLog();
- TestUtil.logMsg("Got connection and log for whitebox-permissiondd.");
- } catch (Exception e) {
- TestUtil.logMsg("Exception caught on creating connection.");
- throw new Exception(e.getMessage(), e);
- }
-
- // Turn tracing on if you want to see the log contents
- TestUtil.logTrace(log.toString());
-
- for (int i = 0; i < log.size(); i++) {
- String str = (String) log.elementAt(i);
- if (str.startsWith(toCheck1)) {
- b1 = true;
- break;
- }
- }
-
- if (b1) {
- TestUtil.logMsg("testValidateLocalGrantForCustomPerm PASSED.");
- } else {
- if (!b1) {
- TestUtil.logMsg(
- "Failures can occur if you are not running with Security Manager enabled in your appserver.");
- throw new Exception("testValidateLocalGrantForCustomPerm FAILED.");
- }
- }
-
- }
-
/*
* @testName: testValidateRequiredPermSet
*
diff --git a/ejb30-ws/pom.xml b/ejb30-ws/pom.xml
deleted file mode 100644
index b5b79d5664..0000000000
--- a/ejb30-ws/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
- 4.0.0
-
-
- jakarta.tck
- project
- 11.0.0-SNAPSHOT
-
-
- ejb30-ws
- jar
-
- ejb30-ws
- ejb30-ws
-
-
-
- jakarta.xml.ws
- jakarta.xml.ws-api
-
-
- jakarta.ejb
- jakarta.ejb-api
-
-
- jakarta.interceptor
- jakarta.interceptor-api
-
-
-
-
-
-
- src/main/java
-
- **/*.xml
-
-
- **/build.xml
-
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
diff --git a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/HelloImpl.java b/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/HelloImpl.java
deleted file mode 100644
index c81506bc29..0000000000
--- a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/HelloImpl.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.clientview;
-
-import jakarta.ejb.Stateless;
-import jakarta.jws.WebService;
-
-@WebService(name = "Hello", serviceName = "HelloService")
-@Stateless
-
-public class HelloImpl {
- public String sayHello(String param) {
-
- return "Hello " + param;
- }
-}
diff --git a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/HelloImpl.java b/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/HelloImpl.java
deleted file mode 100644
index c366857a75..0000000000
--- a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/HelloImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.interceptor;
-
-import jakarta.ejb.Stateless;
-import jakarta.interceptor.Interceptors;
-import jakarta.jws.WebService;
-
-@WebService(name = "Hello", serviceName = "HelloService")
-@Stateless
-
-public class HelloImpl {
- @Interceptors(com.sun.ts.tests.ejb30.webservice.interceptor.WebServiceInterceptor.class)
- public String sayHello(String param) {
-
- return "Hello " + param;
- }
-}
diff --git a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/WebServiceInterceptor.java b/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/WebServiceInterceptor.java
deleted file mode 100644
index bb43131717..0000000000
--- a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/WebServiceInterceptor.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.interceptor;
-
-import java.lang.reflect.Method;
-import java.util.Map;
-
-import com.sun.ts.tests.ejb30.common.helper.TLogger;
-
-import jakarta.interceptor.AroundInvoke;
-import jakarta.interceptor.InvocationContext;
-
-/**
- * A business method interceptor for EJB based WebService.
- *
- * Test_Strategy: 1) Use WebServiceInterceptor to intercept all webservice
- * method invocations.
- *
- * 2) During such invocation, the InvocationContext supplied to the interceptors
- * should contain the following details.
- *
- * 1) The getTarget() of Invocation Context should return the bean instance 2)
- * The getMethod() should return the method of bean class for which the
- * interceptor is invoked. 3) The getParameters() method should return the
- * parameters of the business method invocation. 4) The Map returned by the
- * getContextData() method must be an instance of JAX-WS Message context. i.e.
- * jakarta.xml.ws.handler.MessageContext
- *
- * 3) If any of the above values are incorrect, then the interceptor throws
- * exception and the webservice invocation context test fails.
- *
- */
-public class WebServiceInterceptor {
-
- public WebServiceInterceptor() {
- super();
- }
-
- @AroundInvoke
- public Object intercept(InvocationContext ctx) throws Exception {
- Method method = ctx.getMethod();
- TLogger.log("Interceptor invoked for method " + method.toString());
-
- // Get MessageContext from InvocationContext
- Map contextDataMap = ctx.getContextData();
- TLogger.log("InvocationContext.getContextData() type: "
- + contextDataMap.getClass());
-
- if (contextDataMap instanceof jakarta.xml.ws.handler.MessageContext) {
- TLogger.log(
- "ContextDataMap is an instance of jakarta.xml.ws.handler.MessageContext ");
-
- Object target = ctx.getTarget();
- if (target instanceof com.sun.ts.tests.ejb30.webservice.interceptor.HelloImpl) {
-
- TLogger.log("getTarget() returned an instance of HelloImpl ");
-
- } else {
- TLogger.log(
- "InvocationContext.getTarget() didn't return an instance of HelloImpl");
- throw new RuntimeException(
- "InvocationContext.getTarget() didn't return an instance of HelloImpl");
-
- }
-
- Object[] parameters = ctx.getParameters();
- if (parameters != null) {
- if (parameters[0].equals("Raja")) {
- TLogger.log("parameters = " + parameters[0]);
- } else {
- throw new RuntimeException(
- "Wrong webservice invocation Parameters passed");
- }
- }
-
- return ctx.proceed();
- } else {
- TLogger.log(
- "ContextDataMap is not an instance of jakarta.xml.ws.handler.MessageContext ");
- throw new RuntimeException(
- "ContextDataMap is not an instance of jakarta.xml.ws.handler.MessageContext");
-
- }
-
- // Map processing.
- /*
- * if(contextDataMap!=null){
- *
- * // Iterate through the map Set entries = contextDataMap.entrySet();
- * Iterator iterator = entries.iterator(); while (iterator.hasNext()) {
- * Map.Entry entry = (Map.Entry)iterator.next(); String KeyName =
- * entry.getKey().toString(); TLogger.log(KeyName + " : " +
- * entry.getValue()); } }
- */
-
- }
-}
diff --git a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java b/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java
deleted file mode 100644
index 00e3ce0c23..0000000000
--- a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.wscontext;
-
-import java.security.Principal;
-
-import jakarta.annotation.Resource;
-import jakarta.annotation.security.DeclareRoles;
-import jakarta.annotation.security.RolesAllowed;
-import jakarta.ejb.Stateless;
-import jakarta.jws.WebService;
-import jakarta.xml.ws.WebServiceContext;
-import jakarta.xml.ws.WebServiceException;
-
-@WebService(name = "Hello", serviceName = "HelloService")
-@Stateless
-@DeclareRoles("Administrator")
-public class HelloImpl {
- @Resource
- private WebServiceContext wsContext;
-
- @RolesAllowed({ "Administrator" })
- public String sayHelloProtected(String param) throws WebServiceException {
- String output = "";
-
- Object msgContext = wsContext.getMessageContext();
- if (msgContext instanceof jakarta.xml.ws.handler.MessageContext) {
- output += " 1. MessageContext is an instance of jakarta.xml.ws.handler.MessageContext ";
- } else {
- throw new WebServiceException(
- "MessageContext not an instance of jakarta.xml.ws.handler.MessageContext");
- }
-
- Principal invocationPrincipal = wsContext.getUserPrincipal();
- String principalName = invocationPrincipal.getName();
-
- if (invocationPrincipal != null) {
- output += " 2. Web Service invoked by user " + principalName;
- } else {
- throw new WebServiceException("UnExpected user principal");
- }
-
- if (wsContext.isUserInRole("Administrator")) {
- output += " 3. User j2ee is in role Administrator ";
- } else {
- throw new WebServiceException("User not in role Administrator");
- }
-
- return "Hello " + param + output;
- }
-}
diff --git a/ejb30/pom.xml b/ejb30/pom.xml
index 184857392b..fdc3c7673d 100644
--- a/ejb30/pom.xml
+++ b/ejb30/pom.xml
@@ -45,11 +45,6 @@
${project.groupId}common
-
- ${project.groupId}
- ejb30-ws
- ${project.version}
- ${project.groupId}servlet
@@ -131,67 +126,6 @@
true
-
- com.sun.xml.ws
- jaxws-maven-plugin
-
-
- hello-service-clientview
-
- wsgen
-
- generate-sources
-
- com.sun.ts.tests.ejb30.webservice.clientview.HelloImpl
- ${project.build.directory}/generated-sources/
- true
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/clientview
-
-
-
- hello-service-interceptor
-
- wsgen
-
- generate-sources
-
- com.sun.ts.tests.ejb30.webservice.interceptor.HelloImpl
- ${project.build.directory}/generated-sources/
- true
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/interceptor
-
-
-
- hello-service-wscontext
-
- wsgen
-
- generate-sources
-
- com.sun.ts.tests.ejb30.webservice.wscontext.HelloImpl
- ${project.build.directory}/generated-sources/
- true
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/wscontext
-
-
-
- ws-services
-
- wsimport
-
- process-sources
-
- ${project.build.directory}/generated-sources/
- ${jaxwsStaleDirectory}/com/sun/ts/tests/ejb30/webservice
-
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/clientview/HelloService.wsdl
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/interceptor/HelloService.wsdl
- ${project.build.directory}/generated-sources/wsdl/com/sun/ts/tests/ejb30/webservice/wscontext/HelloService.wsdl
-
-
-
-
-
diff --git a/ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/common/helper/TLogger.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/common/helper/TLogger.java
similarity index 100%
rename from ejb30-ws/src/main/java/com/sun/ts/tests/ejb30/common/helper/TLogger.java
rename to ejb30/src/main/java/com/sun/ts/tests/ejb30/common/helper/TLogger.java
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/Client.java
deleted file mode 100644
index affad1fdee..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/Client.java
+++ /dev/null
@@ -1,675 +0,0 @@
-/*
- * Copyright (c) 2013, 2018, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.sec.permsxml;
-
-import java.io.FilePermission;
-import java.net.SocketPermission;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.Permission;
-import java.security.PrivilegedExceptionAction;
-import java.security.SecurityPermission;
-import java.util.Properties;
-import java.util.PropertyPermission;
-
-import com.sun.ts.lib.harness.Status;
-import com.sun.ts.lib.harness.EETest;
-import com.sun.ts.lib.porting.TSLoginContext;
-
-import jakarta.annotation.Resource;
-import jakarta.ejb.EJB;
-
-public class Client extends EETest {
-
- // JNDI names for looking up ejbs
- @EJB(beanName = "PermDDTestEJB")
- static private PermDDTestIF ejbref = null;
-
- @Resource(lookup = "java:comp/InAppClientContainer")
- static private Boolean inAppClientContainer;
-
- private static final String UserNameProp = "user";
-
- private static final String UserPasswordProp = "password";
-
- private static final String AuthUser = "authuser";
-
- private String authuser = "";
-
- private String username = "";
-
- private String password = "";
-
- private Properties props = null;
-
- private TSLoginContext lc = null;
-
- private static final String SEC_MGR_WARNING = "ERROR: Security Manager is NOT enabled and must be for these tests. If you have passed these tests while running with Security Manager enabled, you can use keywords to bypass the running of these tests when Security Manager is disabled.";
-
- public static void main(String[] args) {
- Client theTests = new Client();
- Status s = theTests.run(args, System.out, System.err);
- s.exit();
- }
-
- /*
- * @class.setup_props: user; password; authuser;
- */
-
- public void setup(String[] args, Properties p) throws Exception {
- props = p;
-
- try {
- authuser = props.getProperty(AuthUser);
- username = props.getProperty(UserNameProp);
- password = props.getProperty(UserPasswordProp);
-
- // debug aid
- if (inAppClientContainer.booleanValue() == true) {
- logTrace("In ACC.");
- } else {
- logTrace("NOT in ACC.");
- }
-
- lc = new TSLoginContext();
- lc.login(username, password);
-
- } catch (Exception e) {
- throw new Exception("Setup failed:", e);
- }
- }
-
- /*
- * @testName: ValidateCustomPerm
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:293;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using locally declared Permission impl
- * (SecurityPermission) (note: this perm does not support actions) - have
- * declared grant for this (SecurityPermission) in permissions.xml - also
- * declared grant for SecurityPermission at higher app server level (thus we
- * have grant declared twice.) (Must have grant for SecurityPermission
- * "CTSPermission1_name") - within ejb, use AccessController.checkPermission()
- * to confirm our permissons are as expected
- */
- public void ValidateCustomPerm() throws Exception {
- logTrace("Enterred ValidateCustomPerm()");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (ejbref == null) {
- logTrace("ValidateCustomPerm: oh oh - ejbref == null!");
- throw new Exception("FAILURE: unexpected null value for ejbref.");
- } else {
- logTrace("ValidateCustomPerm: good - ejbref != null!");
- }
-
- if (!ejbref.validateCustomPerm()) {
- throw new Exception("ValidateCustomPerm test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateCustomPerm test failed: ", e);
- }
-
- logMsg("SUCCESS: ValidateCustomPerm Passed");
- }
-
- /*
- * @testName: ValidateCustomPermInACC
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:293;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using locally declared Permission impl
- * (SecurityPermission) (note: this perm does not support actions) - have
- * declared grant for this (SecurityPermission) in permissions.xml - also
- * declared grant for SecurityPermission at higher app server level (thus we
- * have grant declared twice.) (Must have grant for SecurityPermission
- * "CTSPermission1_name") - within ACC, use AccessController.checkPermission()
- * to confirm our permissons are as expected
- */
- public void ValidateCustomPermInACC() throws Exception {
- logTrace("Starting ValidateCustomPermInACC test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- // call a priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission1_name");
- doCheckPermission(perm);
-
- // we have perms so should get here
- logTrace("CTSPermission1_name permission okay");
- } catch (AccessControlException ex) {
- throw new Exception(
- "FAILURE: CTSPermission1_name perm missing, throwing AccessControlException.",
- ex);
- } catch (Exception ex) {
- throw new Exception(
- "FAILURE: ValidateCustomPermInACC(), throwing unexpected Exception.",
- ex);
- }
-
- logMsg("SUCCESS: ValidateCustomPermInACC Passed.");
- }
-
- /*
- * @testName: ValidateLocalGrantForCustomPerm
- *
- * @assertion_ids: JavaEE:SPEC:292; JavaEE:SPEC:293; JavaEE:SPEC:303;
- * JavaEE:SPEC:304;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using locally declared Permission impl
- * (SecurityPermission) note: SecurityPermission does NOT have support for
- * actions. - have declared grant in permissions.xml - have NO declared grant
- * at higher app server level (e.g. server.policy etc) - within ejb, use
- * AccessController.checkPermission() to confirm our permissons are as
- * expected
- *
- */
- public void ValidateLocalGrantForCustomPerm() throws Exception {
- logTrace("Starting ValidateLocalGrantForCustomPerm test");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (!ejbref.validateLocalGrantForCustomPerm()) {
- throw new Exception("ValidateLocalGrantForCustomPerm test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateLocalGrantForCustomPerm test failed:", e);
- }
-
- logMsg("SUCCESS: ValidateLocalGrantForCustomPerm Passed");
- }
-
- /*
- * @testName: ValidateLocalGrantForCustomPermInACC
- *
- * @assertion_ids: JavaEE:SPEC:292; JavaEE:SPEC:293; JavaEE:SPEC:303;
- * JavaEE:SPEC:304;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using locally declared Permission impl
- * (SecurityPermission) note: SecurityPermission does NOT have support for
- * actions. - have declared grant in permissions.xml - have NO declared grant
- * at higher app server level (e.g. server.policy etc) - within ACC, use
- * AccessController.checkPermission() to confirm our permissons are as
- * expected
- *
- */
- public void ValidateLocalGrantForCustomPermInACC() throws Exception {
- logTrace("Starting ValidateLocalGrantForCustomPermInACC test");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- // call a priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission2_name");
- doCheckPermission(perm);
-
- // should get here!
- logMsg("SUCCESS: ValidateLocalGrantForCustomPermInACC passed.");
- } catch (AccessControlException ex) {
- // we do NOT have perms so we should NOT get here
- logMsg(
- "CTSPermission2_name permission property threw unexpected AccessControlException.");
- throw new Exception(
- "FAILURE: validateLocalGrantForCustomPerm() did threw unexpected AccessControlException.",
- ex);
- } catch (Exception ex) {
- throw new Exception(
- "FAILURE: ValidateLocalGrantForCustomPermInACC threw unexpected exception.",
- ex);
- }
-
- logMsg("SUCCESS: ValidateLocalGrantForCustomPermInACC Passed.");
- }
-
- /*
- * @testName: ValidateRestrictedLocalPerm
- *
- * @assertion_ids: JavaEE:SPEC:292; JavaEE:SPEC:293; JavaEE:SPEC:303;
- * JavaEE:SPEC:304;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using perm (PropertyPermission) that is referenced
- * in permission.xml and has read but not write assigned note:
- * PropertyPermission has support for actions - have NO declared grants for
- * PropertyPermission at higher app server level (e.g. server.policy etc) so
- * that it is ONLY bundled in this local app and ref'd in permission.xml -
- * within ejb, use AccessController.checkPermission() to confirm our
- * permissons are as expected
- *
- */
- public void ValidateRestrictedLocalPerm() throws Exception {
- logTrace("Starting ValidateRestrictedLocalPerm test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (!ejbref.validateRestrictedLocalPerm()) {
- throw new Exception("ValidateRestrictedLocalPerm test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateRestrictedLocalPerm test failed:", e);
- }
- logMsg("SUCCESS: ValidateRestrictedLocalPerm Passed");
- }
-
- /*
- * @testName: ValidateRestrictedLocalPermInACC
- *
- * @assertion_ids: JavaEE:SPEC:292; JavaEE:SPEC:293; JavaEE:SPEC:303;
- * JavaEE:SPEC:304;
- *
- * @test_Strategy: This validates that we have a particular grant under the
- * following conditions: - using perm (PropertyPermission) that is referenced
- * in permission.xml and has read but not write assigned note:
- * PropertyPermission has support for actions - have NO declared grants for
- * PropertyPermission at higher app server level (e.g. server.policy etc) so
- * that it is ONLY bundled in this local app and ref'd in permission.xml -
- * within ACC, use AccessController.checkPermission() to confirm our
- * permissons are as expected
- *
- */
- public void ValidateRestrictedLocalPermInACC() throws Exception {
- logTrace("Starting ValidateRestrictedLocalPermInACC test");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- // call a priviledged method
- PropertyPermission readPropertyPerm = new PropertyPermission(
- "TestPropertyPerm", "read");
-
- try {
- doCheckPermission(readPropertyPerm);
- // should get here
- logMsg(
- "ValidateRestrictedLocalPermInACC() has grant for read of TestPropertyPerm");
- } catch (AccessControlException ex) {
- // should not get here.
- throw new Exception(
- "FAILURE: ValidateRestrictedLocalPermInACC() threw unexpected exception for read of TestPropertyPerm.",
- ex);
- } catch (NullPointerException ex) {
- throw new Exception(
- "FAILURE: ValidateRestrictedLocalPermInACC() threw NullPointerException for read of TestPropertyPerm.",
- ex);
- }
-
- /*
- * // XXXX: if EE were to conclusively state it supports local
- * permissions, we could // validate using customPermissions that a write
- * was not assigned but when // using common EE permissions, we can not be
- * sure that EE perms restrict // allowing PropertyPermission "write"
- * actions so we cant assume its restricted // by default and won't test
- * for this at this current rev. PropertyPermission writePropertyPerm =
- * new PropertyPermission("TestPropertyPerm", "write"); try {
- * doCheckPermission(writePropertyPerm); // should NOT get here - we
- * should have had an excpetion thrown throw new
- * Fault("FAILURE: ValidateRestrictedLocalPermInACC() did not throw expected exception for write of TestPropertyPerm."
- * ); } catch (AccessControlException ex) {
- * logMsg("ValidateRestrictedLocalPermInACC() threw expected exception for write of TestPropertyPerm."
- * ); } catch (NullPointerException ex) { throw new
- * Fault("FAILURE: ValidateRestrictedLocalPermInACC() threw NullPointerException for write of TestPropertyPerm."
- * , ex); }
- */
- } catch (Exception ex) {
- throw new Exception(
- "FAILURE: ValidateRestrictedLocalPermInACC had unexpected exception.");
- }
-
- logMsg("SUCCESS: ValidateRestrictedLocalPermInACC Passed.");
- }
-
- /*
- * @testName: ValidateMissingPermFails
- *
- * @assertion_ids: JavaEE:SPEC:289; JavaEE:SPEC:290;
- *
- * @test_Strategy: This validates that we are NOT granted a certain permission
- * and so when we try to do our access checks, we expect to see an
- * AccessControl exception returned. This validates that we have no grant
- * under the following conditions: - using locally declared Permission impl
- * (SecurityPermission) - have NO declared grant in permissions.xml - have NO
- * declared grant at higher app server level (e.g. server.policy etc) - within
- * ejb, use AccessController.checkPermission() to confirm our permissons are
- * as expected
- *
- */
- public void ValidateMissingPermFails() throws Exception {
- logTrace("Starting ValidateMissingPermFails test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (!ejbref.validateMissingPermFails()) {
- throw new Exception("ValidateMissingPermFails test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateMissingPermFails test failed:", e);
- }
-
- logMsg("SUCCESS: ValidateMissingPermFails Passed");
- }
-
- /*
- * @testName: ValidateMissingPermFailsInACC
- *
- * @assertion_ids: JavaEE:SPEC:289; JavaEE:SPEC:290;
- *
- * @test_Strategy: This validates that we are NOT granted a certain permission
- * and so when we try to do our access checks, we expect to see an
- * AccessControl exception returned. This validates that we have no grant
- * under the following conditions: - using locally declared Permission impl
- * (SecurityPermission) - have NO declared grant in permissions.xml - have NO
- * declared grant at higher app server level (e.g. server.policy etc) - within
- * ACC, use AccessController.checkPermission() to confirm our permissons are
- * as expected
- *
- */
- public void ValidateMissingPermFailsInACC() throws Exception {
- logTrace("Starting ValidateMissingPermFailsInACC test");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- // call a non-priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission3_name");
- doCheckPermission(perm);
-
- // we do NOT have perms for this perm with name "CTSPermission3_name" so
- // should NOT get here
- throw new Exception("FAILURE: CTSPermission3_name permission okay");
- } catch (AccessControlException ex) {
- // we should get here!
- logMsg("CTSPermission3_name does not exist and was caught.");
- } catch (Exception ex) {
- throw new Exception(
- "FAILURE: ValidateMissingPermFailsInACC threw unexpected exception.",
- ex);
- }
-
- logMsg("SUCCESS: ValidateMissingPermFailsInACC Passed.");
- }
-
- /*
- * @testName: ValidateRequiredPermSet
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:296;
- *
- * @test_Strategy: This validates that we are NOT granted a certain permission
- * and so when we try to do our access checks, we expect to see an
- * AccessControl exception returned. This validates that we have no grant
- * under the following conditions: - using locally declared Permission impl
- * (SecurityPermission) - have NO declared grant in permissions.xml - have NO
- * declared grant at higher app server level (e.g. server.policy etc) - within
- * ejb, use AccessController.checkPermission() to confirm our permissons are
- * as expected
- *
- */
- public void ValidateRequiredPermSet() throws Exception {
- logTrace("Starting ValidateRequiredPermSet test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (!ejbref.validateRequiredPermSet()) {
- throw new Exception("ValidateRequiredPermSet test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateRequiredPermSet test failed:", e);
- }
-
- logMsg("SUCCESS: ValidateRequiredPermSet Passed");
- }
-
- /*
- * @testName: ValidateRequiredPermSetInACC
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:296;
- *
- * @test_Strategy: This validates that we are NOT granted a certain permission
- * and so when we try to do our access checks, we expect to see an
- * AccessControl exception returned. This validates that we have no grant
- * under the following conditions: - using locally declared Permission impl
- * (SecurityPermission) - have NO declared grant in permissions.xml - have NO
- * declared grant at higher app server level (e.g. server.policy etc) - within
- * ACC, use AccessController.checkPermission() to confirm our permissons are
- * as expected
- *
- */
- public void ValidateRequiredPermSetInACC() throws Exception {
- logMsg("Starting ValidateRequiredPermSetInACC test");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- RuntimePermission rtperm = new RuntimePermission("loadLibrary.*");
- doCheckPermission(rtperm);
- logTrace("ValidateRequiredPermSetInACC(): valid perm for: "
- + rtperm.toString());
-
- RuntimePermission rtperm2 = new RuntimePermission("queuePrintJob");
- doCheckPermission(rtperm2);
- logTrace("ValidateRequiredPermSetInACC(): valid perm for: "
- + rtperm2.toString());
-
- SocketPermission socperm = new SocketPermission("*", "connect");
- doCheckPermission(socperm);
- logTrace("ValidateRequiredPermSetInACC(): valid perm for: "
- + socperm.toString());
-
- FilePermission fperm = new FilePermission("*", "read");
- doCheckPermission(fperm);
- logTrace("ValidateRequiredPermSetInACC(): valid perm for: "
- + fperm.toString());
-
- PropertyPermission pperm = new PropertyPermission("*", "read");
- doCheckPermission(pperm);
- logTrace("ValidateRequiredPermSetInACC(): valid perm for: "
- + pperm.toString());
-
- } catch (AccessControlException ex) {
- throw new Exception(
- "FAILURE: validateRequiredPermSet had perm missing, throwing AccessControlException.",
- ex);
-
- } catch (Exception ex) {
- throw new Exception(
- "FAILURE: validateRequiredPermSet had unexpected Exception.", ex);
- }
-
- logMsg("SUCCESS: ValidateRequiredPermSetInACC Passed.");
- }
-
- /*
- * @testName: ValidateLocalPermsInvalidName
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:296;
- *
- * @test_Strategy: This validates that a perm (PropertyPermission) that is
- * bundled with the app. Additionally, we want to verify the perm for
- * class=PropertyPermission does NOT pass the access check since we will be
- * trying to access a non-existing/invalid named perm. Then, as a sanity
- * check, access a perm using a name that IS validly defined in
- * permissions.xml (but not defined at any higher appserver level).
- *
- * This tests the following conditions: - NO permission declared in app server
- * nor in permissions.xml for PropertyPermission named "NonExistingName" w/
- * READ action (should get AccessControlException since no grant exists for
- * this) - using locally declared Permission impl (SecurityPermission named
- * "CTSPermission_second_name") (should be allowed to pass AccessController
- * check for this.) - have NO declared grant at higher app server level (e.g.
- * server.policy etc) - within ejb, use AccessController.checkPermission() to
- * confirm our permissons are treated as expected
- *
- */
- public void ValidateLocalPermsInvalidName() throws Exception {
-
- logMsg("Starting ValidateLocalPermsInvalidName test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- if (!ejbref.validateLocalPermsInvalidName()) {
- throw new Exception("ValidateLocalPermsInvalidName test failed");
- }
- } catch (Exception e) {
- throw new Exception("ValidateLocalPermsInvalidName test failed:", e);
- }
-
- logMsg("SUCCESS: ValidateLocalPermsInvalidName Passed");
- }
-
- /*
- * @testName: ValidateLocalPermsInvalidNameInACC
- *
- * @assertion_ids: JavaEE:SPEC:290; JavaEE:SPEC:296;
- *
- * @test_Strategy: This validates that a perm (PropertyPermission) that is
- * bundled with the app. Additionally, we want to verify the perm for
- * class=PropertyPermission does NOT pass the access check since we will be
- * trying to access a non-existing/invalid named perm. Then, as a sanity
- * check, access a perm using a name that IS validly defined in
- * permissions.xml (but not defined at any higher appserver level).
- *
- * This tests the following conditions: - NO permission declared in app server
- * nor in permissions.xml for PropertyPermission named "NonExistingName" w/
- * READ action (should get AccessControlException since no grant exists for
- * this) - using locally declared Permission impl (SecurityPermission named
- * "CTSPermission_second_name") (should be allowed to pass AccessController
- * check for this.) - have NO declared grant at higher app server level (e.g.
- * server.policy etc) - within ejb, use AccessController.checkPermission() to
- * confirm our permissons are treated as expected
- *
- */
- public void ValidateLocalPermsInvalidNameInACC() throws Exception {
-
- logMsg("Starting ValidateLocalPermsInvalidNameInACC test");
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- logMsg(SEC_MGR_WARNING);
- throw new Exception(SEC_MGR_WARNING);
- }
-
- // call a priviledged method that does not exist
- SecurityPermission readPropertyPerm = new SecurityPermission(
- "NonExistingName");
-
- try {
- doCheckPermission(readPropertyPerm);
- // should NOT get here
- throw new Exception(
- "FAILURE: ValidateLocalPermsInvalidNameInACC() did not throw expected AccessControlException.");
- } catch (AccessControlException ex) {
- // should get here.
- logMsg(
- "SUCCESS: ValidateLocalPermsInvalidNameInACC() threw expected AccessControlException");
- } catch (NullPointerException ex) {
- throw new Exception(
- "FAILURE: ValidateLocalPermsInvalidNameInACC() threw NullPointerException");
- }
-
- // next call a priviledged method that does exist
- try {
- // call a priviledged method - that exists only in permissions.xml
- SecurityPermission perm = new SecurityPermission(
- "CTSPermission_second_name");
- doCheckPermission(perm);
-
- // should get here.
- // we have locally defined grant/perms (thru permissions.xml) so we
- // should get here
- logMsg(
- "CTSPermission_second_name permission property granted AccessControlException.");
- } catch (AccessControlException ex) {
- // should NOT get here
- throw new Exception(
- "FAILURE: ValidateLocalPermsInvalidNameInACC() threw unexpected exception.");
- } catch (Exception ex) {
- // should NOT get here
- ex.printStackTrace();
- throw new Exception(
- "FAILURE: ValidateLocalPermsInvalidNameInACC had unexpeted exception.");
- }
-
- } catch (Exception e) {
- throw new Exception("ValidateLocalPermsInvalidNameInACC test failed:", e);
- }
-
- logMsg("SUCCESS: ValidateLocalPermsInvalidNameInACC Passed");
- }
-
- public void doCheckPermission(Permission pp) throws Exception {
- final Permission perm = pp;
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Void run() throws AccessControlException {
- AccessController.checkPermission(perm);
- return null;
- }
- });
- }
-
- public void cleanup() throws Exception {
- logMsg("cleanup ok");
- }
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestEJB.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestEJB.java
deleted file mode 100644
index 7361a3b89e..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestEJB.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright (c) 2013, 2018, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.sec.permsxml;
-
-import java.io.FilePermission;
-import java.net.SocketPermission;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.security.Permission;
-import java.security.PrivilegedExceptionAction;
-import java.security.SecurityPermission;
-import java.util.PropertyPermission;
-
-import com.sun.ts.lib.util.TestUtil;
-
-import jakarta.ejb.Remote;
-import jakarta.ejb.Stateful;
-
-@Stateful(name = "PermDDTestEJB")
-@Remote({ PermDDTestIF.class })
-public class PermDDTestEJB implements PermDDTestIF {
- private static final String SEC_MGR_WARNING = "ERROR: Security Manager is NOT enabled and must be for these tests. If you have passed these tests while running with Security Manager enabled, you can use keywords to bypass the running of these tests when Security Manager is disabled.";
-
- /*
- * This validates that a permission is bundled with the app and that the app
- * does have grants for that perm. This perm should be granted at both: -
- * configuration (config.vi) to add perm to appserver polcy - in local
- * permissions.xml This should validate we can have the perm declared in both
- * places and it still works. This tests the permission.xml from within an ejb
- */
- public boolean validateCustomPerm() {
- boolean rval = false; // assume fail
-
- debug("Enterred: PermDDTestEJB.validateCustomPerm().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- // call a priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission1_name");
- doCheckPermission(perm);
-
- // we have perms so should get here
- debug("CTSPermission1_name permission okay");
- debug("SUCCESS: validateCustomPerm passed.");
- rval = true;
- } catch (AccessControlException ex) {
- debug(
- "FAILURE: CTSPermission1_name perm missing, throwing AccessControlException.");
- ex.printStackTrace();
- return false;
- } catch (Exception ex) {
- debug("FAILURE: validateCustomPerm(), throwing unexpected Exception.");
- ex.printStackTrace();
- return false;
- }
-
- debug("Leaving PermDDTestEJB.validateCustomPerm() with rval = " + rval);
-
- return rval;
- }
-
- /*
- * This expects to have our user defined permission (SecurityPermission) named
- * "CTSPermission2_name" that is NOT defined in the appserver security policy
- * subsystem (e.g. server.policy) but it is defined in the permissions.xml.
- * This validates that a permission is bundled with the app and that the app
- * does NOT have the higher level app server grants for that perm but this
- * does have local grants for that permission via permissions.xml. There are
- * no actions define for this perm. This tests the permission.xml from within
- * an ejb
- */
- public boolean validateLocalGrantForCustomPerm() {
- boolean rval = false; // assume fail
-
- debug("Enterred: PermDDTestEJB.validateLocalGrantForCustomPerm().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- // call a priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission2_name");
- doCheckPermission(perm);
-
- // we have locally defined grant/perms (thru permissions.xml) so we should
- // get here
- debug("SUCCESS: validateLocalGrantForCustomPerm passed.");
- rval = true;
- } catch (AccessControlException ex) {
- debug(
- "CTSPermission2_name permission property threw unexpected AccessControlException.");
- debug(
- "FAILURE: validateLocalGrantForCustomPerm() did threw unexpected AccessControlException.");
- } catch (Exception ex) {
- debug(
- "FAILURE: validateLocalGrantForCustomPerm had unexpeted exception.");
- ex.printStackTrace();
- }
-
- return rval;
- }
-
- /*
- * This validates that a perm (CTSPropertyPermission) is bundled with the app
- * and that the app does NOT have grants for that perms write action but it
- * should have perms for the read action. The perm is defined ONLY in
- * permissions.xml and not defined at the higher (app server) level. This
- * tests the permission.xml from within an ejb
- */
- public boolean validateRestrictedLocalPerm() {
- boolean rval = false; // assume fail
-
- debug("Enterred: PermDDTestEJB.validateRestrictedLocalPerm().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- // call a priviledged method
- PropertyPermission readPropertyPerm = new PropertyPermission(
- "TestPropertyPerm", "read");
-
- try {
- doCheckPermission(readPropertyPerm);
- // should get here
- debug(
- "SUCCESS: validateRestrictedLocalPerm() has grant for read of TestPropertyPerm");
- rval = true;
- } catch (AccessControlException ex) {
- // should not get here.
- debug(
- "FAILURE: validateRestrictedLocalPerm() threw unexpected exception for read of TestPropertyPerm.");
- ex.printStackTrace();
- return false;
- }
-
- /*
- * // XXXX: if EE were to conclusively state it supports local
- * permissions, we could // validate using customPermissions that a write
- * was not assigned but when // using common EE permissions, we can not be
- * sure that EE perms restrict // allowing PropertyPermission "write"
- * actions so we cant assume its restricted // by default and won't test
- * for this at this current rev. PropertyPermission writePropertyPerm =
- * new PropertyPermission("TestPropertyPerm", "write"); try {
- * doCheckPermission(writePropertyPerm); // should NOT get here - we
- * should have had an excpetion thrown
- * debug("FAILURE: validateRestrictedLocalPerm() did not throw expected exception for write of TestPropertyPerm."
- * ); return false; } catch (AccessControlException ex) {
- * debug("SUCCESS: validateRestrictedLocalPerm() threw expected exception for write of TestPropertyPerm."
- * ); rval = true; }
- */
- debug("SUCCESS: validateRestrictedLocalPerm passed.");
-
- } catch (Exception ex) {
- debug("FAILURE: validateRestrictedLocalPerm had unexpected exception.");
- ex.printStackTrace();
- rval = false;
- }
-
- return rval;
- }
-
- /*
- * This validates that the servlet supports the list of required perms that
- * are listed in JavaEE7 spec, Table EE.6-2 This tests the permission.xml from
- * within an ejb
- */
- public boolean validateRequiredPermSet() {
- boolean rval = false; // assume fail
-
- debug("Enterred: PermDDTestEJB.validateRequiredPermSet().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- RuntimePermission rtperm = new RuntimePermission("loadLibrary.*");
- doCheckPermission(rtperm);
- debug("validateRequiredPermSet(): valid perm for: " + rtperm.toString());
-
- RuntimePermission rtperm2 = new RuntimePermission("queuePrintJob");
- doCheckPermission(rtperm2);
- debug(
- "validateRequiredPermSet(): valid perm for: " + rtperm2.toString());
-
- SocketPermission socperm = new SocketPermission("*", "connect");
- doCheckPermission(socperm);
- debug(
- "validateRequiredPermSet(): valid perm for: " + socperm.toString());
-
- FilePermission fperm = new FilePermission("*", "read");
- doCheckPermission(fperm);
- debug("validateRequiredPermSet(): valid perm for: " + fperm.toString());
-
- PropertyPermission pperm = new PropertyPermission("*", "read");
- doCheckPermission(pperm);
- debug("validateRequiredPermSet(): valid perm for: " + pperm.toString());
-
- // if we have perms we should get here
- debug("SUCCESS: validateRequiredPermSet passed.");
- rval = true;
- } catch (AccessControlException ex) {
- debug(
- "FAILURE: validateRequiredPermSet had perm missing, throwing AccessControlException.");
- ex.printStackTrace();
- } catch (Exception ex) {
- debug("FAILURE: validateRequiredPermSet had unexpected Exception.");
- ex.printStackTrace();
- }
-
- return rval;
- }
-
- /*
- * This validates that the servlet will properly fail a permission check when
- * a particular grant is missing. (in this case, the perm with matching name
- * does not exist in permissions.xml and so should fail access check. This
- * tests the permission.xml from within an ejb.
- */
- public boolean validateMissingPermFails() {
- boolean rval = false; // assume fail
-
- debug("Enterred: PermDDTestEJB.validateMissingPermFails().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- // call a non-priviledged method
- SecurityPermission perm = new SecurityPermission("CTSPermission3_name");
- doCheckPermission(perm);
-
- // we do NOT have perms for this perm with name "CTSPermission3_name" so
- // should NOT get here
- debug("FAILURE: CTSPermission3_name permission okay");
- } catch (AccessControlException ex) {
- debug("SUCCESS: CTSPermission3_name doesnt exist and was caught.");
- debug("SUCCESS: validateMissingPermFails passed.");
- rval = true;
- } catch (Exception ex) {
- debug("FAILURE: validateMissingPermFails threw unexpected exception.");
- ex.printStackTrace();
- }
-
- return rval;
- }
-
- /*
- * This validates that a perm (PropertyPermission) that is bundled with the
- * app. Additionally, we want to verify the perm for class=PropertyPermission
- * does NOT pass the access check since we will be trying to access a
- * non-existing/invalid named perm. Then, as a sanity check, access a perm
- * using a name that IS validly defined in permissions.xml (but not defined at
- * any higher appserver level). This tests the permission.xml from within an
- * ejb.
- */
- public boolean validateLocalPermsInvalidName() {
-
- debug("Enterred: PermDDTestEJB.validateLocalPermsInvalidName().");
-
- try {
- if (null == System.getSecurityManager()) {
- // security manager is NOT enabled and must be for these tests
- debug(SEC_MGR_WARNING);
- return false;
- }
-
- // call a priviledged method that does not exist
- SecurityPermission readPropertyPerm = new SecurityPermission(
- "NonExistingName");
-
- try {
- doCheckPermission(readPropertyPerm);
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName() did not throw expected AccessControlException.");
- return false;
- } catch (AccessControlException ex) {
- // should get here.
- debug(
- "SUCCESS: validateLocalPermsInvalidName() threw expected AccessControlException");
- }
-
- // next call a priviledged method that does exist
- try {
- // call a priviledged method - that exists only in permissions.xml
- SecurityPermission perm = new SecurityPermission(
- "CTSPermission_second_name");
- doCheckPermission(perm);
-
- // should get here.
- // we have locally defined grant/perms (thru permissions.xml) so we
- // should get here
- debug(
- "CTSPermission_second_name permission property granted AccessControlException.");
- } catch (AccessControlException ex) {
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName() threw unexpected exception.");
- return false;
- } catch (Exception ex) {
- // should NOT get here
- debug(
- "FAILURE: validateLocalPermsInvalidName had unexpeted exception.");
- ex.printStackTrace();
- return false;
- }
-
- debug("SUCCESS: validateLocalPermsInvalidName passed.");
-
- } catch (Exception ex) {
- debug(
- "FAILURE: validateLocalPermsInvalidName had unexpected exception.");
- ex.printStackTrace();
- }
-
- return true;
- }
-
- public void doCheckPermission(Permission pp) throws Exception {
- final Permission perm = pp;
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Void run() throws AccessControlException {
- AccessController.checkPermission(perm);
- return null;
- }
- });
- }
-
- private void debug(String str) {
- System.out.println(str);
- TestUtil.logMsg(str);
- }
-
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestIF.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestIF.java
deleted file mode 100644
index 06c1fd5dce..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/PermDDTestIF.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.sec.permsxml;
-
-public interface PermDDTestIF {
- public boolean validateCustomPerm();
-
- public boolean validateLocalGrantForCustomPerm();
-
- public boolean validateRequiredPermSet();
-
- public boolean validateMissingPermFails();
-
- public boolean validateRestrictedLocalPerm();
-
- public boolean validateLocalPermsInvalidName();
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/build.xml
deleted file mode 100644
index 05ad969c56..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/build.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml.ear.sun-application.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml.ear.sun-application.xml
deleted file mode 100644
index 222da0d7f5..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml.ear.sun-application.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- 0
-
- Administrator
- j2ee
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.jar.sun-application-client.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.jar.sun-application-client.xml
deleted file mode 100644
index 97bcf92fb6..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.jar.sun-application-client.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.xml
deleted file mode 100644
index 084bc0ef07..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_client.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- application client
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.jar.sun-ejb-jar.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.jar.sun-ejb-jar.xml
deleted file mode 100644
index 8e1da42b4b..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.jar.sun-ejb-jar.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
- Administrator
- j2ee
-
-
- 0
-
- PermDDTestEJB
- ejb3_sec_permsxml_PermDDTestEJB
- false
-
- j2ee
-
- false
- -1
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.xml
deleted file mode 100644
index 551620bd99..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/ejb3_sec_permsxml_ejb.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- PermDDTestEJB
- PermDDTestEJB
- com.sun.ts.tests.ejb30.sec.permsxml.PermDDTestIF
- com.sun.ts.tests.ejb30.sec.permsxml.PermDDTestEJB
-
- ADMIN
- Administrator
-
-
-
-
-
-
-
-
- Administrator
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/permissions.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/permissions.xml
deleted file mode 100644
index a82d1141b6..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/sec/permsxml/permissions.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
- java.security.SecurityPermission
- CTSPermission1_name
-
-
- java.security.SecurityPermission
- CTSPermission2_name
-
-
- java.security.SecurityPermission
- CTSPermission_second_name
-
-
- java.lang.RuntimePermission
- loadLibrary.*
-
-
- java.lang.RuntimePermission
- queuePrintJob
-
-
- java.net.SocketPermission
- *
- connect
-
-
- java.io.FilePermission
- *
- read
-
-
- java.util.PropertyPermission
- TestPropertyPerm
- read
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/build.xml
deleted file mode 100644
index deab86d048..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/build.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Client.java
deleted file mode 100644
index eba8d9dac3..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Client.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.clientview;
-
-import com.sun.ts.lib.harness.EETest;
-import com.sun.ts.lib.util.TestUtil;
-import com.sun.ts.lib.porting.TSURL;
-import com.sun.ts.lib.harness.Status;
-
-import jakarta.xml.ws.WebServiceRef;
-import jakarta.xml.ws.BindingProvider;
-import jakarta.xml.ws.ProtocolException;
-
-import java.util.Properties;
-import java.util.Map;
-import java.net.URL;
-
-/**
- *
- * @author Raja Perumal
- */
-public class Client extends EETest {
- @WebServiceRef(name = "service/HelloService")
- static HelloService service;
-
- private Hello port;
-
- private Properties props = null;
-
- private TSURL ctsurl = new TSURL();
-
- private String hostname = "localhost";
-
- private String PROTOCOL = "http";
-
- private String urlString = null;
-
- private int portnum = 8000;
-
- public static void main(String[] args) {
- Client theTests = new Client();
- Status s = theTests.run(args, System.out, System.err);
- s.exit();
- }
-
- /*
- * @class.setup_props: webServerHost; webServerPort;
- */
- public void setup(String[] args, Properties p) throws Exception {
- props = p;
- try {
- hostname = props.getProperty("webServerHost");
- portnum = Integer.parseInt(props.getProperty("webServerPort"));
- urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum,
- "/HelloService/Hello");
-
- } catch (Exception e) {
- throw new Exception("Setup failed:", e);
- }
-
- TestUtil.logMsg("setup ok");
- }
-
- /*
- * @testName: sayHelloTest
- *
- * @assertion_ids:
- *
- * @test_Strategy:
- *
- */
- public void sayHelloTest() throws Exception {
-
- try {
- Hello port = null;
-
- port = (Hello) getJavaEEPort();
-
- BindingProvider bindingProvider = (BindingProvider) port;
- Map map = bindingProvider.getRequestContext();
-
- TestUtil.logMsg(
- "Setting the target endpoint address on WS port: " + urlString);
- map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString);
-
- TestUtil.logMsg("Invoking sayHello on Hello port");
- String text = port.sayHello("Raja");
- TestUtil.logMsg("Got Output : " + text);
-
- } catch (Exception e) {
- e.printStackTrace();
- throw new Exception("Test sayHello failed");
- }
-
- }
-
- public Object getJavaEEPort() throws Exception {
- TestUtil.logMsg("Get Hello Port from HelloService");
- Object port = service.getPort(Hello.class);
- return port;
- }
-
- public void cleanup() throws Exception {
- logMsg("cleanup ok");
- }
-
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Hello.ear.sun-application.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Hello.ear.sun-application.xml
deleted file mode 100644
index eaf9132d1f..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/Hello.ear.sun-application.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- 0
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.clientear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.clientear
deleted file mode 100644
index 7083657eec..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.clientear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientviewClnt
-
- HelloClnt_client.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.ejbear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.ejbear
deleted file mode 100644
index 7566959b71..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/application.xml.ejbear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientview
-
- Hello_ejb.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/build.xml
deleted file mode 100644
index 6415ebde1c..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/clientview/build.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Client.java
deleted file mode 100644
index 313df07481..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Client.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.interceptor;
-
-import java.util.Map;
-import java.util.Properties;
-
-import com.sun.ts.lib.harness.Status;
-import com.sun.ts.lib.harness.EETest;
-import com.sun.ts.lib.porting.TSURL;
-import com.sun.ts.lib.util.TestUtil;
-
-import jakarta.xml.ws.BindingProvider;
-import jakarta.xml.ws.WebServiceRef;
-
-/**
- *
- * @author Raja Perumal
- */
-public class Client extends EETest {
- @WebServiceRef(name = "service/HelloService")
- static HelloService service;
-
- private HelloService port;
-
- private Properties props = null;
-
- private TSURL ctsurl = new TSURL();
-
- private String hostname = "localhost";
-
- private String PROTOCOL = "http";
-
- private String urlString = null;
-
- private int portnum = 8000;
-
- public static void main(String[] args) {
- Client theTests = new Client();
- Status s = theTests.run(args, System.out, System.err);
- s.exit();
- }
-
- /*
- * @class.setup_props: webServerHost; webServerPort;
- */
- public void setup(String[] args, Properties p) throws Exception {
- props = p;
- try {
- hostname = props.getProperty("webServerHost");
- portnum = Integer.parseInt(props.getProperty("webServerPort"));
- urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum,
- "/HelloService/Hello");
-
- } catch (Exception e) {
- throw new Exception("Setup failed:", e);
- }
-
- TestUtil.logMsg("setup ok");
- }
-
- /*
- * @testName: InvocationContextTest
- *
- * @assertion_ids:
- *
- * @test_Strategy: 1) Use WebServiceInterceptor to intercept all webservice
- * method invocations.
- *
- * 2) During such invocation, the InvocationContext supplied to the
- * interceptors should contain the following details.
- *
- * 1) The getTarget() of Invocation Context should return the bean instance 2)
- * The getMethod() should return the method of bean class for which the
- * interceptor is invoked. 3) The getParameters() method should return the
- * parameters of the business method invocation. 4) The Map returned by the
- * getContextData() method must be an instance of JAX-WS Message context. i.e.
- * jakarta.xml.ws.handler.MessageContext
- *
- * 3) If any of the above values are incorrect, then the interceptor throws
- * exception and the webservice method invocation test fails.
- *
- */
- public void InvocationContextTest() throws Exception {
-
- try {
- Hello port = (Hello) getJavaEEPort();
-
- BindingProvider bindingProvider = (BindingProvider) port;
- Map map = bindingProvider.getRequestContext();
-
- TestUtil.logMsg(
- "Setting the target endpoint address on WS port: " + urlString);
- map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString);
-
- TestUtil.logMsg("Invoking sayHello on Hello port");
- String text = port.sayHello("Raja");
- TestUtil.logMsg("Got Output : " + text);
-
- } catch (Exception e) {
- e.printStackTrace();
- throw new Exception("InvocationContextTest failed");
- }
-
- }
-
- public Object getJavaEEPort() throws Exception {
- TestUtil.logMsg("Get Hello Port from HelloService");
- Object port = service.getPort(Hello.class);
- return port;
- }
-
- public void cleanup() throws Exception {
- logMsg("cleanup ok");
- }
-
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Hello.ear.sun-application.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Hello.ear.sun-application.xml
deleted file mode 100644
index eaf9132d1f..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/Hello.ear.sun-application.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- 0
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.clientear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.clientear
deleted file mode 100644
index 7083657eec..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.clientear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientviewClnt
-
- HelloClnt_client.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.ejbear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.ejbear
deleted file mode 100644
index 7566959b71..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/application.xml.ejbear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientview
-
- Hello_ejb.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/build.xml
deleted file mode 100644
index 5fe7e05cde..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/interceptor/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Client.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Client.java
deleted file mode 100644
index 27aa5df42c..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Client.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.wscontext;
-
-import java.util.Map;
-import java.util.Properties;
-
-import com.sun.ts.lib.harness.Status;
-import com.sun.ts.lib.harness.EETest;
-import com.sun.ts.lib.porting.TSURL;
-import com.sun.ts.lib.util.TestUtil;
-
-import jakarta.xml.ws.BindingProvider;
-import jakarta.xml.ws.WebServiceException;
-import jakarta.xml.ws.WebServiceRef;
-
-/**
- *
- * @author Raja Perumal
- */
-public class Client extends EETest {
- @WebServiceRef(name = "service/HelloService")
- static HelloService service;
-
- private Hello port;
-
- private Properties props = null;
-
- private TSURL ctsurl = new TSURL();
-
- private String hostname = "localhost";
-
- private String PROTOCOL = "http";
-
- private String urlString = null;
-
- private int portnum = 8000;
-
- private String username = "";
-
- private String password = "";
-
- public static void main(String[] args) {
- Client theTests = new Client();
- Status s = theTests.run(args, System.out, System.err);
- s.exit();
- }
-
- /*
- * @class.setup_props: webServerHost; webServerPort; user; password;
- */
- public void setup(String[] args, Properties p) throws Exception {
- props = p;
- try {
- hostname = props.getProperty("webServerHost");
- portnum = Integer.parseInt(props.getProperty("webServerPort"));
- username = props.getProperty("user");
- password = props.getProperty("password");
- urlString = ctsurl.getURLString(PROTOCOL, hostname, portnum,
- "/service/HelloService");
-
- } catch (Exception e) {
- throw new Exception("Setup failed:", e);
- }
-
- TestUtil.logMsg("setup ok");
- }
-
- /*
- * @testName: WebServiceContextTest
- *
- * @assertion_ids:
- *
- * @test_Strategy:
- *
- * 1) During webservice invocation, the WebServiceContext injected to the
- * webservice should have the following.
- *
- * 1) The getMessageContext() on WebServiceContext should return an instance
- * of JAX-WS Message context. i.e. jakarta.xml.ws.handler.MessageContext
- *
- * 2) The getUserPrincipal() Returns the Principal that identifies the sender
- * of the request.
- *
- * 3) The isUserInRole("Administrator") method should return true Note: The
- * user j2ee is mapped to role Adminstrator
- *
- * 2) If any of the above values are incorrect, then the sayHelloProtected()
- * method throws exception and the WebServiceContextTest fails.
- *
- */
- public void WebServiceContextTest() throws Exception {
-
- try {
- Hello port = (Hello) getJavaEEPort();
-
- BindingProvider bindingProvider = (BindingProvider) port;
- Map map = bindingProvider.getRequestContext();
-
- TestUtil.logMsg(
- "Setting the target endpoint address on WS port: " + urlString);
- map.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urlString);
-
- // set Username
- map.put(BindingProvider.USERNAME_PROPERTY, username);
-
- // set password
- map.put(BindingProvider.PASSWORD_PROPERTY, password);
-
- TestUtil.logMsg("Invoking sayHelloProtected on Hello port");
- String text = port.sayHelloProtected("Raja");
- TestUtil.logMsg("Got Output : " + text);
-
- } catch (WebServiceException we) {
- we.printStackTrace();
- throw new Exception("WebServiceContext values not correct");
- } catch (Exception e) {
- e.printStackTrace();
- throw new Exception("WebServiceContextTest failed");
- }
-
- }
-
- public Object getJavaEEPort() throws Exception {
- TestUtil.logMsg("Get Hello Port from HelloService");
- Object port = service.getPort(Hello.class);
- return port;
- }
-
- public void cleanup() throws Exception {
- logMsg("cleanup ok");
- }
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello.ear.sun-application.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello.ear.sun-application.xml
deleted file mode 100644
index 6e832ee599..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello.ear.sun-application.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- 0
-
- Administrator
- j2ee
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java
deleted file mode 100644
index 00e3ce0c23..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/HelloImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package com.sun.ts.tests.ejb30.webservice.wscontext;
-
-import java.security.Principal;
-
-import jakarta.annotation.Resource;
-import jakarta.annotation.security.DeclareRoles;
-import jakarta.annotation.security.RolesAllowed;
-import jakarta.ejb.Stateless;
-import jakarta.jws.WebService;
-import jakarta.xml.ws.WebServiceContext;
-import jakarta.xml.ws.WebServiceException;
-
-@WebService(name = "Hello", serviceName = "HelloService")
-@Stateless
-@DeclareRoles("Administrator")
-public class HelloImpl {
- @Resource
- private WebServiceContext wsContext;
-
- @RolesAllowed({ "Administrator" })
- public String sayHelloProtected(String param) throws WebServiceException {
- String output = "";
-
- Object msgContext = wsContext.getMessageContext();
- if (msgContext instanceof jakarta.xml.ws.handler.MessageContext) {
- output += " 1. MessageContext is an instance of jakarta.xml.ws.handler.MessageContext ";
- } else {
- throw new WebServiceException(
- "MessageContext not an instance of jakarta.xml.ws.handler.MessageContext");
- }
-
- Principal invocationPrincipal = wsContext.getUserPrincipal();
- String principalName = invocationPrincipal.getName();
-
- if (invocationPrincipal != null) {
- output += " 2. Web Service invoked by user " + principalName;
- } else {
- throw new WebServiceException("UnExpected user principal");
- }
-
- if (wsContext.isUserInRole("Administrator")) {
- output += " 3. User j2ee is in role Administrator ";
- } else {
- throw new WebServiceException("User not in role Administrator");
- }
-
- return "Hello " + param + output;
- }
-}
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello_ejb.jar.sun-ejb-jar.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello_ejb.jar.sun-ejb-jar.xml
deleted file mode 100755
index 9aaca41b67..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/Hello_ejb.jar.sun-ejb-jar.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
- 0
-
- HelloImpl
- HelloImpl
-
- Hello
- service/HelloService
-
- BASIC
-
- NONE
-
-
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.clientear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.clientear
deleted file mode 100644
index 7083657eec..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.clientear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientviewClnt
-
- HelloClnt_client.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.ejbear b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.ejbear
deleted file mode 100644
index 7566959b71..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/application.xml.ejbear
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Application description
- clientview
-
- Hello_ejb.jar
-
-
diff --git a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/build.xml b/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/build.xml
deleted file mode 100644
index d078af65a5..0000000000
--- a/ejb30/src/main/java/com/sun/ts/tests/ejb30/webservice/wscontext/build.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ejb32/rewrite-pom.xml b/ejb32/rewrite-pom.xml
index 6f1da40bd6..4300155327 100644
--- a/ejb32/rewrite-pom.xml
+++ b/ejb32/rewrite-pom.xml
@@ -131,11 +131,6 @@
ejb30${project.version}
-
- ${project.groupId}
- ejb30-ws
- ${project.version}
- ${project.groupId}ejb32
diff --git a/jpa/rewrite-pom.xml b/jpa/rewrite-pom.xml
index 3e07f74a9a..2c7d714960 100644
--- a/jpa/rewrite-pom.xml
+++ b/jpa/rewrite-pom.xml
@@ -131,11 +131,6 @@
ejb30${project.version}
-
- ${project.groupId}
- ejb30-ws
- ${project.version}
- ${project.groupId}ejb32
@@ -707,7 +702,7 @@
-
org.openrewrite.mavenrewrite-maven-plugin
diff --git a/pom.xml b/pom.xml
index 6ca86340d6..ce079b4f33 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,7 +45,6 @@
ejb30
- ejb30-wsejb32elel-tck
@@ -173,11 +172,6 @@
ejb30${project.version}
-
- ${project.groupId}
- ejb30-ws
- ${project.version}
- ${project.groupId}ejb32
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/JAXWSSigTest.java b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/JAXWSSigTest.java
deleted file mode 100644
index 9cac018734..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/JAXWSSigTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-package com.sun.ts.tests.signaturetest.jaxws;
-
-import java.io.PrintWriter;
-import java.util.Properties;
-
-import com.sun.ts.lib.harness.Status;
-import com.sun.ts.tests.signaturetest.SigTestEE;
-import com.sun.ts.tests.signaturetest.SignatureTestDriver;
-import com.sun.ts.tests.signaturetest.SignatureTestDriverFactory;
-
-/*
- * This class is a simple example of a signature test that extends the
- * SigTest framework class. This signature test is run outside of the
- * Java EE containers. This class also contains the boilerplate
- * code necessary to create a signature test using the test framework.
- * To see a complete TCK example see the javaee directory for the Java EE
- * TCK signature test class.
- */
-public class JAXWSSigTest extends SigTestEE {
-
- private static final long serialVersionUID = -2869098797765586541L;
-
- /***** Abstract Method Implementation *****/
-
- /**
- * Returns a list of strings where each string represents a package name. Each
- * package name will have it's signature tested by the signature test
- * framework.
- *
- * @return String[] The names of the packages whose signatures should be
- * verified.
- */
- protected String[] getPackages(String vehicleName) {
- return new String[] { "jakarta.xml.ws", "jakarta.xml.ws.handler",
- "jakarta.xml.ws.handler.soap", "jakarta.xml.ws.http", "jakarta.xml.ws.soap",
- "jakarta.xml.ws.spi", "jakarta.xml.ws.spi.http",
- "jakarta.xml.ws.wsaddressing", };
-
- }
-
- /***** Boilerplate Code *****/
-
- /**
- * Entry point for different-VM execution. It should delegate to method
- * run(String[], PrintWriter, PrintWriter), and this method should not contain
- * any test configuration.
- */
- public static void main(String[] args) {
- JAXWSSigTest theTests = new JAXWSSigTest();
- Status s = theTests.run(args, new PrintWriter(System.out),
- new PrintWriter(System.err));
- s.exit();
- }
-
- /**
- * Entry point for same-VM execution. In different-VM execution, the main
- * method delegates to this method.
- */
- public Status run(String args[], PrintWriter out, PrintWriter err) {
-
- return super.run(args, out, err);
- }
-
- /*
- * The following comments are specified in the base class that defines the
- * signature tests. This is done so the test finders will find the right class
- * to run. The implementation of these methods is inherited from the super
- * class which is part of the signature test framework.
- */
-
- // NOTE: If the API under test is not part of your testing runtime
- // environment, you may use the property sigTestClasspath to specify
- // where the API under test lives. This should almost never be used.
- // Normally the API under test should be specified in the classpath
- // of the VM running the signature tests. Use either the first
- // comment or the one below it depending on which properties your
- // signature tests need. Please do not use both comments.
-
- /*
- * @class.setup_props: sigTestClasspath, Location of JAXWS jar files; ts_home;
- */
- public void setup() throws Exception {
- super.setup();
- }
-
- /*
- * @testName: signatureTest
- *
- * @assertion: A JAXWS platform must implement the required classes and APIs
- * specified in the JAXWS Specification.
- *
- * @test_Strategy: Using reflection, gather the implementation specific
- * classes and APIs. Compare these results with the expected (required)
- * classes and APIs.
- *
- */
-
- /*
- * Call the parent class's cleanup method.
- */
-
- /*
- * define which sig driver we will use
- */
- protected SignatureTestDriver getSigTestDriver() {
- driver = SignatureTestDriverFactory
- .getInstance(SignatureTestDriverFactory.SIG_TEST);
-
- return driver;
-
- } // END getSigTestDriver
-
-} // end class JAXWSSigTest
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/build.xml b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/build.xml
deleted file mode 100644
index 5e0457c6eb..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/build.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.bat b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.bat
deleted file mode 100644
index d34eb01075..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-WEBCONTAINER_HOME=%CATALINA_HOME%
-JAXWS_CLASSES=%JAXWS_HOME%/lib/FastInfoset.jar;%JAXWS_HOME%/lib/activation.jar;%JAXWS_HOME%/libgmbal-api-only.jar;%JAXWS_HOME%/lib/http.jar;%JAXWS_HOME%/lib/jaxb-api.jar;%JAXWS_HOME%/lib/jaxb-impl.jar;%JAXWS_HOME%/lib/jaxb-xjc.jar;%JAXWS_HOME%/lib/jaxws-api.jar;%JAXWS_HOME%/lib/jaxws-rt.jar;%JAXWS_HOME%/lib/jaxws-tools.jar;%JAXWS_HOME%/lib/jsr173_api.jar;%JAXWS_HOME%/lib/jsr181-api.jar;%JAXWS_HOME%/lib/jsr250-api.jar;%JAXWS_HOME%/lib/management-api.jar;%JAXWS_HOME%/lib/mimepull.jar;%JAXWS_HOME%/lib/policy.jar;%JAXWS_HOME%/lib/resolver.jar;%JAXWS_HOME%/lib/saaj-api.jar;%JAXWS_HOME%/lib/saaj-impl.jar;%JAXWS_HOME%/lib/woodstox.jar;%JAXWS_HOME%/lib/stax-ex.jar;%JAXWS_HOME%/lib/streambuffer.jar;%WEBCONTAINER_HOME%/common/lib/servlet-api.jar
-cd ../signature-repository
-%TS_HOME%\bin\ant -f ..\record-build.xml -Drecorder.type=sigtest -Dsig.source=%JAXWS_CLASSES%;%JAVA_HOME%\jre\lib\rt.jar -Dmap.file=%TS_HOME%\bin\sig-test.map record.sig.batch
-cd ../jaxws
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.sh b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.sh
deleted file mode 100644
index 8b1bb4db47..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/jaxws/record.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-PATHSEP=:
-WEBCONTAINER_HOME=$CATALINA_HOME
-JAXWS_CLASSES=${JAXWS_HOME}/lib/FastInfoset.jar${PATHSEP}${JAXWS_HOME}/lib/activation.jar${PATHSEP}${JAXWS_HOME}/lib/gmbal-api-only.jar${PATHSEP}${JAXWS_HOME}/lib/http.jar${PATHSEP}${JAXWS_HOME}/lib/jaxb-api.jar${PATHSEP}${JAXWS_HOME}/lib/jaxb-impl.jar${PATHSEP}${JAXWS_HOME}/lib/jaxb-xjc.jar${PATHSEP}${JAXWS_HOME}/lib/jaxws-api.jar${PATHSEP}${JAXWS_HOME}/lib/jaxws-rt.jar${PATHSEP}${JAXWS_HOME}/lib/jaxws-tools.jar${PATHSEP}${JAXWS_HOME}/lib/jsr173_api.jar${PATHSEP}${JAXWS_HOME}/lib/jsr181-api.jar${PATHSEP}${JAXWS_HOME}/lib/jsr250-api.jar${PATHSEP}${JAXWS_HOME}/lib/management-api.jar${PATHSEP}${JAXWS_HOME}/lib/mimepull.jar${PATHSEP}${JAXWS_HOME}/lib/policy.jar${PATHSEP}${JAXWS_HOME}/lib/resolver.jar${PATHSEP}${JAXWS_HOME}/lib/saaj-api.jar${PATHSEP}${JAXWS_HOME}/lib/saaj-impl.jar${PATHSEP}${JAXWS_HOME}/lib/woodstox.jar${PATHSEP}${JAXWS_HOME}/lib/stax-ex.jar${PATHSEP}${JAXWS_HOME}/lib/streambuffer.jar${PATHSEP}${WEBCONTAINER_HOME}/common/lib/servlet-api.jar
-cd ../signature-repository
-ant -f ../record-build.xml -Drecorder.type=sigtest -Dsig.source=${JAXWS_CLASSES}:$JAVA_HOME/jre/lib/rt.jar \
- -Dmap.file=$TS_HOME/install/jaxws/bin/sig-test.map record.sig.batch
-cd ../jaxws
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/Client.java b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/Client.java
deleted file mode 100644
index f55cca6ebb..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/Client.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-/*
- * $Id$
- */
-
-/*
- *
- */
-
-package com.sun.ts.tests.signaturetest.wsmd;
-
-import java.io.PrintWriter;
-import java.util.Properties;
-
-import com.sun.ts.lib.harness.Status;
-import com.sun.ts.tests.signaturetest.SigTest;
-import com.sun.ts.tests.signaturetest.SignatureTestDriver;
-import com.sun.ts.tests.signaturetest.SignatureTestDriverFactory;
-
-/*
- * This class is a simple example of a signature test that extends the
- * SigTest framework class. This signature test is run outside of the
- * Java EE containers. This class also contains the boilerplate
- * code necessary to create a signature test using the test framework.
- * To see a complete TCK example see the javaee directory for the Java EE
- * TCK signature test class.
- */
-public class Client extends SigTest {
-
- /***** Abstract Method Implementation *****/
-
- /**
- * Returns a list of strings where each string represents a package name. Each
- * package name will have it's signature tested by the signature test
- * framework.
- *
- * @return String[] The names of the packages whose signatures should be
- * verified.
- */
- protected String[] getPackages() {
- return new String[] { "jakarta.jws", "jakarta.jws.soap", };
-
- }
-
- /***** Boilerplate Code *****/
-
-
- /*
- * The following comments are specified in the base class that defines the
- * signature tests. This is done so the test finders will find the right class
- * to run. The implementation of these methods is inherited from the super
- * class which is part of the signature test framework.
- */
-
- // NOTE: If the API under test is not part of your testing runtime
- // environment, you may use the property sigTestClasspath to specify
- // where the API under test lives. This should almost never be used.
- // Normally the API under test should be specified in the classpath
- // of the VM running the signature tests. Use either the first
- // comment or the one below it depending on which properties your
- // signature tests need. Please do not use both comments.
-
- /*
- * @class.setup_props: ts_home;
- */
- public void setup() {
- super.setup();
- }
-
- /*
- * @testName: signatureTest
- *
- * @assertion: A Provisioning platform must implement the required classes and
- * APIs specified in the Provisioning Specification.
- *
- * @test_Strategy: Using reflection, gather the implementation specific
- * classes and APIs. Compare these results with the expected (required)
- * classes and APIs.
- *
- */
-
- /*
- * Call the parent class's cleanup method.
- */
-
- /*
- * define which sig driver we will use
- */
- protected SignatureTestDriver getSigTestDriver() {
-
- if (driver == null) {
- driver = SignatureTestDriverFactory
- .getInstance(SignatureTestDriverFactory.SIG_TEST);
- }
-
- return driver;
-
- } // END getSigTestDriver
-
-} // end class ProvisioningSigTest
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/build.xml b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/build.xml
deleted file mode 100644
index e0edfc8af7..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/build.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/record.sh b/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/record.sh
deleted file mode 100644
index 0a6fc058f9..0000000000
--- a/signaturetest/src/main/java/com/sun/ts/tests/signaturetest/wsmd/record.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-cd ../signature-repository
-ant -f ../record-build.xml -Drecorder.type=sigtest -Dsig.source=/files/xml/jaxws/jaxws/lib/jsr181-api.jar \
- -Dmap.file=$TS_HOME/bin/sig-test.map record.sig.batch
-cd ../wsmd
-