Initial Contribution
Signed-off-by: Vinay Vishal <vinay.vishal@oracle.com>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/README b/appserver/tests/appserv-tests/devtests/webservice/README
new file mode 100644
index 0000000..7af0c9f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/README
@@ -0,0 +1,25 @@
+web service unit tests
+----------------------
+
+1. Start domain
+2. ant all
+3. Expected results are :
+
+ [exec] ************************
+ [exec] PASSED= 81
+ [exec] ------------ =========
+ [exec] FAILED= 0
+ [exec] ------------ =========
+ [exec] DID NOT RUN= 0
+ [exec] ------------ =========
+ [exec] Total Expected = 81
+ [exec] ************************
+
+
+FAILED TESTS :
+
+None
+
+DID NOT RUN :
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/annotations-common.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/annotations-common.xml
new file mode 100644
index 0000000..fe4aaf9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/annotations-common.xml
@@ -0,0 +1,131 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<property environment="env"/>
+<property file="${env.APS_HOME}/config.properties"/>
+
+<target name="all" depends="clean, compile, run, undeploy, report"/>
+
+<target name="clean">
+ <delete dir="${env.APS_HOME}/build/module/classes"/>
+</target>
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+<target name="compile">
+ <mkdir dir="${env.APS_HOME}/build/module/classes"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <property name="class-name" value="${pkg-name}/${server}.class"/>
+ <echo message="Compiling into ${pkg-name}/${server}.class"/>
+ <javac srcdir="." destdir="${env.S1AS_HOME}/domains/domain1/autodeploy"
+ includes="${src-name}">
+ <classpath refid="classpath"/>
+ </javac>
+</target>
+
+<target name="compile-client">
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="${client-src-name}"/>
+</target>
+
+<target name="deploy">
+ <antcall target="compile"/>
+</target>
+
+<target name="undeploy">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <property name="class-name" value="${pkg-name}/${server}.class"/>
+ <echo message="Removing file ${class-name} from autodeploy directory"/>
+ <delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="undeploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_undeployFailed"/>
+ </condition>
+</target>
+
+<target name="report" depends="internal-report-success, internal-report-failure">
+ <delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_*"/>
+</target>
+
+<target name="run">
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_deployFailed"/>
+ </condition>
+ <antcall target="internal-run"/>
+ <antcall target="internal-report-failure"/>
+</target>
+
+
+
+<target name="internal-run" if="deploy_succeeded">
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
+ </exec>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+</target>
+
+<target name="internal-report-success" if="undeploy_succeeded">
+ <antcall target="report-success"/>
+</target>
+
+<target name="internal-report-failure" if="undeploy_failed, deploy_failed">
+ <antcall target="report-failure"/>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.properties
new file mode 100644
index 0000000..b084c54
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="asyncservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.xml
new file mode 100644
index 0000000..817d668
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/build.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="asyncservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/webservice/AsyncService?WSDL"/>
+<replace file="custom-client.xml" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="custom-client.xml" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -b custom-client.xml -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/webservice/AsyncService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="async-web-svc-test"/>
+ </antcall>
+
+
+<!--restore the tokens back in file-->
+ <replace file="custom-client.xml" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="custom-client.xml" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/client/Client.java
new file mode 100644
index 0000000..b248058
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/client/Client.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("async-service");
+ Client client = new Client();
+ client.doSyncTest();
+ client.doASyncPollTest();
+ client.doASyncCallBackTest();
+ stat.printSummary("async-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ int ret = port.addNumbers(2222, 1234);
+ if(ret!=(2222+1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-service-sync-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-service-sync-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-service-sync-test", stat.FAIL);
+ }
+ }
+
+ private void doASyncPollTest () {
+ System.out.println ("Invoking Asynchronous Polling addNumbers");
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ Response<AddNumbersResponse> resp = port.addNumbersAsync(1234, 5678);
+ Thread.sleep (2000);
+ AddNumbersResponse output = resp.get();
+ int ret = output.getReturn();
+ if(ret!=(1234+5678)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-service-poll-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-service-poll-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-service-poll-test", stat.FAIL);
+ }
+ }
+
+ public void doASyncCallBackTest () {
+ System.out.println ("Invoking Asynchronous Callback addNumbers");
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ AddNumbersCallbackHandler cbh = new AddNumbersCallbackHandler();
+ Future<?> response = port.addNumbersAsync(9876, 5432, cbh);
+ Thread.sleep (2000);
+ AddNumbersResponse output = cbh.getResponse ();
+ int ret = output.getReturn();
+ if(ret!=(9876+5432)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-service-callbackhandler-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-service-callbackhandler-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-service-callbackhandler-test", stat.FAIL);
+ }
+ }
+
+ // The actual call back handler
+ private class AddNumbersCallbackHandler implements AsyncHandler<AddNumbersResponse> {
+ private AddNumbersResponse output;
+ public void handleResponse (Response<AddNumbersResponse> response) {
+ try {
+ output = response.get ();
+ } catch (ExecutionException e) {
+ e.printStackTrace ();
+ } catch (InterruptedException e) {
+ e.printStackTrace ();
+ }
+ }
+
+ AddNumbersResponse getResponse (){
+ return output;
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/custom-client.xml
new file mode 100644
index 0000000..f30c7ae
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/custom-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="http://HTTP_HOST:HTTP_PORT/asyncservice/webservice/AsyncService?WSDL"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ <enableAsyncMapping>true</enableAsyncMapping>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..0dac6b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/endpoint/AddNumbersImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public class AddNumbersImpl {
+ public int addNumbers(int n1, int n2) {
+ System.out.println ("Received add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/async/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/web.xml
new file mode 100644
index 0000000..e667727
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/async/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AsyncService</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/build.xml
new file mode 100644
index 0000000..ff5e0a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/build.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+<project name="servlet endpoint annotations" default="all" basedir=".">
+ <target name="all">
+ <ant dir="noname" target="all"/>
+ <ant dir="noname2" target="all"/>
+ <!--ant dir="externalwsdl" target="all"/-->
+
+ <ant dir="dol-override-1" target="all"/>
+ <ant dir="webservices13-addressing" target="all"/>
+ <ant dir="webserviceref-lookup" target="all"/>
+ <ant dir="webservices13-addressing-2" target="all"/>
+ <ant dir="provider" target="all"/>
+ <ant dir="svchandler-1" target="all"/>
+ <ant dir="svchandler-2" target="all"/>
+ <ant dir="svchandler-3" target="all"/>
+ <ant dir="svchandler-4" target="all"/>
+ <ant dir="client-handler-1" target="all"/>
+ <ant dir="client-handler-2" target="all"/>
+ <ant dir="mtom" target="all"/>
+ <ant dir="containerresolver" target="all"/>
+ <ant dir="endpointaddress" target="all"/>
+ <ant dir="fault" target="all"/>
+ <ant dir="webservicerefs" target="all"/>
+ <ant dir="warservice" target="all"/>
+ <ant dir="wsdltojava" target="all"/>
+ <ant dir="wsctxt" target="all"/>
+ <ant dir="soap12" target="all"/>
+ <ant dir="oneway" target="all"/>
+ <ant dir="msgctxt" target="all"/>
+ <ant dir="nowebxml" target="all"/>
+ <ant dir="webservices13-respectbinding" target="all"/>
+ <ant dir="async" target="all"/>
+ <ant dir="restful" target="all"/>
+ <ant dir="restful-2" target="all"/>
+ <ant dir="pkgedwarservice" target="all"/>
+ <ant dir="mappedname" target="all"/>
+ <!--<ant dir="mbyte" target="all"/>-->
+ <ant dir="postconstruct" target="all"/>
+<!-- <ant dir="jaxrpcinjection" target="all"/>
+ <ant dir="providerhandler" target="all"/>
+ <ant dir="prepkged-svc-1" target="all"/>
+ <ant dir="libdependent" target="all"/>
+ <ant dir="soaptcp" target="all"/>
+ <ant dir="webservices13-addressing-appclient" target="all"/>
+-->
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.properties
new file mode 100644
index 0000000..77b0a22
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="client-handler-1"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.xml
new file mode 100644
index 0000000..9772067
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/build.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="client-handler-1" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/client-handler-1"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/wsdl"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes SubtractNumbers.wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpathref="class.path"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <copy file="./SubtractNumbers.wsdl" todir="${build.classes.dir}/webclient/WEB-INF/wsdl"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-web.xml
new file mode 100644
index 0000000..d8aa2e5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client-web.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <service-ref>
+ <service-ref-name>client.Client/service</service-ref-name>
+ <service-interface>client.SubtractNumbersService</service-interface>
+ <handler-chains>
+ <handler-chain>
+ <handler>
+ <handler-name>TEST_HANDLER</handler-name>
+ <handler-class>client.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+ </handler-chains>
+ </service-ref>
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client/TestClient.java
new file mode 100644
index 0000000..a6b5f5d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-clienthandler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1109]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("client-handler-1", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("client-handler-1", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..b855a46
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/Client.java
new file mode 100644
index 0000000..500a5da
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(wsdlLocation="WEB-INF/wsdl/SubtractNumbers.wsdl") SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/client-handler-1/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/TestHandler.java
new file mode 100644
index 0000000..5421452
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webclient/TestHandler.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "CLIENT_HANDLER_PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ if ("CLIENT_HANDLER_PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ }
+ System.out.println("injectedString = " + injectedString);
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(--number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-1/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.properties
new file mode 100644
index 0000000..0a7695c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="client-handler-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.xml
new file mode 100644
index 0000000..7bc8506
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/build.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="client-handler-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/client-handler-2/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="endpoint/myhandler.xml" todir="${build.classes.dir}/endpoint"/>
+ <antcall target="pkg-war">
+ <param name="handler.name" value="myhandler.xml"/>
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/client-handler-2"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/client-handler-2/SubtractNumbers.wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpathref="class.path"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <copy file="webclient/myhandler.xml" todir="${build.classes.dir}/webclient/WEB-INF/classes/client"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+<!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client/TestClient.java
new file mode 100644
index 0000000..1860549
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-client-handler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1115]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("client-handler-2", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("client-handler-2", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..4e86556
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.HandlerChain(name="some name", file="myhandler.xml")
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+System.out.println("I got n1 = " + number1 + " and n2 = " + number2);
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/TestHandler.java
new file mode 100644
index 0000000..2454918
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/TestHandler.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(++number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's SERVER SIDE TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/myhandler.xml
new file mode 100644
index 0000000..9b79e5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/endpoint/myhandler.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>endpoint.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/Client.java
new file mode 100644
index 0000000..97f28be
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.jws.HandlerChain(name="some name", file="myhandler.xml")
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/client-handler-2/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/TestHandler.java
new file mode 100644
index 0000000..2282aaf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/TestHandler.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(++number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's CLIENT SIDE TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/myhandler.xml
new file mode 100644
index 0000000..730256e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webclient/myhandler.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>client.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/client-handler-2/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/build.xml
new file mode 100644
index 0000000..7c3fa86
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/build.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+<project name="servlet endpoint annotations" default="all" basedir=".">
+ <target name="all">
+ <ant dir="svc1" target="setup"/>
+ <ant dir="svc2" target="setup"/>
+ <ant dir="client" target="setup"/>
+ <ant dir="client" target="runtest"/>
+ <ant dir="svc1" target="cleanup"/>
+ <ant dir="svc2" target="cleanup"/>
+ <ant dir="client" target="cleanup"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.properties
new file mode 100644
index 0000000..2d5952e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="containerresolver-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.xml
new file mode 100644
index 0000000..901335b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/build.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="containerresolver-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, runtest, undeploy-client"/>
+
+ <target name="cleanup" depends="clean, undeploy-client"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="clean, assemble-client, deploy-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/containerresolver-app1/Hello1Service?WSDL"/>
+ </antcall>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/containerresolver-app2/Hello2Service?WSDL"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+
+<!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client/TestClient.java
new file mode 100644
index 0000000..67a0c45
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/client/TestClient.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-containerresolver");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-containerresolver");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello2 Hi]") != -1)
+ found2 = true;
+ if(line.indexOf("[WebSvcTest-Hello1 Hi]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("container-resolver", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("container-resolver", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/webclient/Client.java
new file mode 100644
index 0000000..67d4564
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/client/webclient/Client.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+import com.example.hello1.*;
+import com.example.hello2.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/containerresolver-app1/Hello1Service?wsdl") Hello1Service service1;
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/containerresolver-app2/Hello2Service?wsdl") Hello2Service service2;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ Hello1 port1 = service1.getHello1Port();
+ String ret = port1.sayHello1("Hi");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</p>");
+ Hello2 port2 = service2.getHello2Port();
+ ret = port2.sayHello2("Hi");
+ out.println("[" + ret + "]");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.properties
new file mode 100644
index 0000000..bf02654
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="containerresolver-app1"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.xml
new file mode 100644
index 0000000..6eee595
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/build.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="containerresolver-app1" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="cleanup" depends="clean, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="clean, assemble-web, deploy-app"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint1"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/endpoint1/Hello1.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/endpoint1/Hello1.java
new file mode 100644
index 0000000..9ddb8e5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc1/endpoint1/Hello1.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017, 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 endpoint1;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello1",
+ serviceName="Hello1Service",
+ targetNamespace="http://example.com/Hello1"
+)
+public class Hello1 {
+ public Hello1() {}
+
+ @WebMethod(operationName="sayHello1", action="urn:SayHello1")
+ public String sayHello1(String who) {
+ return "WebSvcTest-Hello1 " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.properties
new file mode 100644
index 0000000..e3b2809
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="containerresolver-app2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.xml
new file mode 100644
index 0000000..1081db4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/build.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="containerresolver-app2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="cleanup" depends="clean, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="clean, assemble-web, deploy-app"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint2"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/endpoint2/Hello2.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/endpoint2/Hello2.java
new file mode 100644
index 0000000..9dbdc9b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/containerresolver/svc2/endpoint2/Hello2.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017, 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 endpoint2;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello2",
+ serviceName="Hello2Service",
+ targetNamespace="http://example.com/Hello2"
+)
+public class Hello2 {
+ public Hello2() {}
+
+ @WebMethod(operationName="sayHello2", action="urn:SayHello2")
+ public String sayHello2(String who) {
+ return "WebSvcTest-Hello2 " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.properties
new file mode 100644
index 0000000..4567ab9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="dol-override-1"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.xml
new file mode 100644
index 0000000..8f96454
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/build.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="dol-override-1" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/dol-override-1/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="SubtractNumbers.wsdl" todir="${env.APS_HOME}/build/localwsdl"/>
+ <copy file="sun-web.xml.template" tofile="sun-web.xml"/>
+ <replace file="sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/dol-override-1"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/dol-override-1/SubtractNumbers.wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml.template" tofile="client-sun-web.xml"/>
+ <replace file="client-sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-sun-web.xml.template
new file mode 100644
index 0000000..d6a7156
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-sun-web.xml.template
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>client.Client/service</service-ref-name>
+ <wsdl-override>%TOKEN%/SubtractNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client/TestClient.java
new file mode 100644
index 0000000..e0e93d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-descoverride-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1111]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("DOL-overiding-of-annotation", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("DOL-overiding-of-annotation", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..34a0642
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService (serviceName="junkjunkjunk", portName="SubtractNumbersPortType", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/sun-web.xml.template
new file mode 100644
index 0000000..7bb304c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/sun-web.xml.template
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-publish-location>%TOKEN%</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webclient/Client.java
new file mode 100644
index 0000000..baacae8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/dol-override-1/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/dol-override-1/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/README b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/README
new file mode 100644
index 0000000..a2906d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/README
@@ -0,0 +1,2 @@
+This test is for bug 6852
+When the page for webservices is clicked the endpoint address should contain host name and port name and not just the URL pattern
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.properties
new file mode 100644
index 0000000..f55a53f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="endpointaddress"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.xml
new file mode 100644
index 0000000..dceb7c8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="endpointaddress" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.Client">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/endpointaddress/HelloService"/>
+ </java>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/client/Client.java
new file mode 100644
index 0000000..3268526
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/client/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.net.*;
+import java.io.*;
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public static void main(String[] args) {
+ stat.addDescription("endpointaddress");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("endpointaddress");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ URL serviceInfo = new URL (args[0]);
+ URLConnection con = serviceInfo.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+ String inputLine;
+ int index=0;
+ while ((inputLine = in.readLine()) != null) {
+ if ((index= inputLine.indexOf("href="))>0){
+
+ String url = inputLine.substring(index+1);
+ if (url.indexOf("http:")>0) {
+ stat.addStatus("endpointaddress", stat.PASS);
+ }
+ System.out.println(inputLine);
+ }
+ }
+ in.close();
+ stat.addStatus("endpointaddress", stat.FAIL);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/endpoint/Hello.java
new file mode 100644
index 0000000..8c6f018
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/endpoint/Hello.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/web.xml
new file mode 100644
index 0000000..f51ccc0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/endpointaddress/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/HelloService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/HelloService.wsdl
new file mode 100644
index 0000000..b1538b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/HelloService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.com/Hello" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="HelloService" targetNamespace="http://example.com/Hello">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Hello" schemaLocation="schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="Hello">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction="urn:SayHello"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloService">
+ <port name="Hello" binding="tns:HelloBinding">
+ <soap:address location="http://blueprints.SFBay.Sun.COM:8080/hello/webservice/HelloService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.properties
new file mode 100644
index 0000000..058f961
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="externalwsdl"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./test-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.xml
new file mode 100644
index 0000000..6776ebc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/build.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="externalwsdl" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="deploy-wsdls, assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="run-wsgen">
+ <antcall target="wsgen">
+ <param name="wsgen.args"
+ value="-wsdl -cp ${build.classes.dir} -keep -d ${build.classes.dir} endpoint.Hello"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile, run-wsgen">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-wsdls"/>
+ </target>
+
+ <target name="runtest">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-service-pointing-to-external-wsdl"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-wsdls" depends="init-common">
+ <property name="wsdl.war" value="${assemble.dir}/wsdl.war"/>
+ <mkdir dir="${assemble.dir}"/>
+ <war destfile="${wsdl.war}" webxml="host-web.xml">
+ <fileset dir="." includes="*.wsdl, *.xsd"/>
+ </war>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${wsdl.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-wsdls" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsdl"/>
+ </exec>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/client/Client.java
new file mode 100644
index 0000000..5528917
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/client/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ @WebServiceRef
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHello();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/endpoint/Hello.java
new file mode 100644
index 0000000..ed4481f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/endpoint/Hello.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello",
+ wsdlLocation="http://localhost:8080/wsdl/HelloService.wsdl"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/host-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/host-web.xml
new file mode 100644
index 0000000..729b013
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/host-web.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>externalwsdl</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/schema1.xsd
new file mode 100644
index 0000000..853d5a5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Hello" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://example.com/Hello"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" form="qualified" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://example.com/Hello"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" form="qualified" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/test-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/test-web.xml
new file mode 100644
index 0000000..5b6bfca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/externalwsdl/test-web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>HelloService</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>HelloService</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.properties
new file mode 100644
index 0000000..e26ecfd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="fault"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.xml
new file mode 100644
index 0000000..afbba3b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/build.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="fault" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="webservice-with-fault"/>
+ </antcall>
+
+ <!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/client/Client.java
new file mode 100644
index 0000000..124fdf6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/client/Client.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.MyService;
+import com.example.hello.MyHello;
+import com.example.hello.MyException_Exception;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/fault/webservice/HelloService?WSDL")
+ static MyService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-fault");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-fault");
+ }
+
+ public void doTest(String[] args) {
+ MyHello port = null;
+ try {
+System.out.println("Service" + service);
+ port = service.getMyHelloPort();
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ boolean gotMyEx = false;
+ try {
+ port.sayHello(null);
+ } catch(MyException_Exception mex) {
+ System.out.println("Got MyException as expected");
+ gotMyEx = true;
+ }
+ if(!gotMyEx) {
+ System.out.println("Did not get MyException thro SOAP fault");
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ try {
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/Hello.java
new file mode 100644
index 0000000..54bdb2a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/Hello.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="MyHello",
+ serviceName="MyService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) throws MyException {
+ if(who == null)
+ throw new MyException("INPUT IS NULL");
+ else
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/MyException.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/MyException.java
new file mode 100644
index 0000000..99449b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/endpoint/MyException.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+public class MyException extends Exception {
+ private String message = "";
+
+ public MyException(String message) {
+ super(message);
+ this.message = message;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/web.xml
new file mode 100644
index 0000000..0708c5c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/fault/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>MyHello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>MyHello</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.properties
new file mode 100644
index 0000000..1bb25b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jaxrpcinjection"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.xml
new file mode 100644
index 0000000..7b069f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/build.xml
@@ -0,0 +1,109 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jaxrpcinjection" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+
+ <target name="all" depends="clean, assemble, deploy, run, undeploy"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="gen-servlet-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/SimpleHandlerMapping_servlet.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/WEB-INF/wsdl config-interface.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile, gen-servlet-wsdl">
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="mappingfile.location" value="${build.classes.dir}"/>
+ <param name="mappingfile.name" value="SimpleHandlerMapping_servlet.xml"/>
+ <param name="wsdlfile.location" value="${build.classes.dir}/WEB-INF/wsdl"/>
+ <param name="wsdlfile.name" value="SimpleHandlerServlet.wsdl"/>
+ <param name="webwar.classes" value="servlet/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="assemble-web, assemble-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <copy file="${build.classes.dir}/WEB-INF/wsdl/SimpleHandlerServlet.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="SimpleHandlerMapping_servlet.xml,META-INF/wsdl/**,simplehandler/**,servlet/SimpleServer.class,com/**" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/ServletHandlerTest/ServletHandlerTest"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="ServletHandlerTest"/>
+ </antcall>
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/Client.java
new file mode 100644
index 0000000..4688b08
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002, 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 simplehandler;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import servlet.*;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-jaxrpc-handler-injection");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-jaxrpc-handler-injection");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ Service testService = (Service) ic.lookup("java:comp/env/service/simplehandler");
+ SimpleServer test = (SimpleServer)
+ testService.getPort(SimpleServer.class);
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+ System.out.println("Invocation returned " + test.sayHello("jerome"));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ stat.addStatus("jaxrpc-handler-injection main", stat.FAIL);
+ System.out.println("CAUGHT UNEXPECTED EXCEPTION: " + ex.getMessage());
+ return;
+ }
+ stat.addStatus("webservices-jaxrpc-handler-injection", stat.PASS);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/MANIFEST.MF
new file mode 100644
index 0000000..5085a53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: simplehandler.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/config-interface.xml
new file mode 100644
index 0000000..07e1cb0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="SimpleHandlerServlet"
+ targetNamespace="urn:HandlerTest"
+ typeNamespace="urn:HandlerTest"
+ packageName="handlertest">
+ <interface name="servlet.SimpleServer"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/application-client.xml
new file mode 100644
index 0000000..c14bb7a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/application-client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my handler app client</description>
+ <display-name>handlerClient</display-name>
+ <service-ref>
+ <description>simple handler service ref</description>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/SimpleHandlerServlet.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_servlet.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:HandlerTest">servicens:SimpleHandlerServlet</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..a4ce49f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:HandlerTest</namespaceURI>
+ <localpart>SimpleHandlerServer</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-web.xml
new file mode 100644
index 0000000..2089c30
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/sun-web.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>ServletHandlerTest</context-root>
+ <servlet>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <webservice-endpoint>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <debugging-enabled>true</debugging-enabled>
+ <property name="prop1" value="value1"/>
+ <property name="prop2" value="value2"/>
+ </webservice-endpoint>
+ </servlet>
+ </sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/web.xml
new file mode 100644
index 0000000..e3a3201
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <servlet-class>servlet.ServletHandlerTestImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <url-pattern>/ServletHandlerTest</url-pattern>
+ </servlet-mapping>
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/webservices.xml
new file mode 100644
index 0000000..e66dd79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/descriptor/webservices.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SimpleHandlerServlet</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SimpleHandlerServlet.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_servlet.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <wsdl-port xmlns:servicens="urn:HandlerTest">servicens:SimpleServerPort</wsdl-port>
+ <service-endpoint-interface>servlet.SimpleServer</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ServletHandlerTest</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>SimpleHandler</handler-name>
+ <handler-class>servlet.SimpleHandler</handler-class>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/ServletHandlerTestImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/ServletHandlerTestImpl.java
new file mode 100644
index 0000000..d171a73
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/ServletHandlerTestImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.rmi.*;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+public class ServletHandlerTestImpl implements SessionBean {
+ SessionContext sc;
+
+ public String sayHello(String hello) throws RemoteException {
+ return "salut " + hello;
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SimpleServer:::ejbCreate !!");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleHandler.java
new file mode 100644
index 0000000..cf7f409
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleHandler.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.util.Date;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.*;
+import javax.annotation.Resource;
+
+public class SimpleHandler extends GenericHandler {
+
+ protected HandlerInfo info = null;
+
+/*
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+*/
+
+ public void init(HandlerInfo info) {
+ this.info = info;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+/*
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ }
+ System.out.println("injectedString = " + injectedString);
+*/
+ try {
+ Date startTime = new Date();
+ context.setProperty("startTime", startTime);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ try {
+ Date startTime = (Date) context.getProperty("startTime");
+ Date endTime = new Date();
+ long elapsed = endTime.getTime() - startTime.getTime();
+ System.out.println(" in handler, elapsed " + elapsed);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleServer.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleServer.java
new file mode 100644
index 0000000..dc5cf26
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxrpcinjection/servlet/SimpleServer.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.rmi.*;
+
+public interface SimpleServer extends Remote {
+
+ public String sayHello(String source) throws RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxwstools.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxwstools.xml
new file mode 100644
index 0000000..b6b0b34
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/jaxwstools.xml
@@ -0,0 +1,141 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+<target name="wsgen" depends="init-common">
+ <exec executable="${WSGEN}" failonerror="true" >
+ <arg line="${wsgen.args}" />
+ </exec>
+</target>
+
+<target name="wsimport" depends="init-common">
+ <exec executable="${WSIMPORT}" failonerror="true" >
+ <arg line="${wsimport.args}" />
+ </exec>
+</target>
+
+<target name="compile-client">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${test-wsdl-uri}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -Xendorsed -d ${build.classes.dir}/client http://${http.host}:${http.port}/${test-wsdl-uri}"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ includes="${client-src}/**">
+ <classpath refid="classpath"/>
+ </javac>
+</target>
+
+<target name="run-client">
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <exec executable="${APPCLIENT}" dir="${build.classes.dir}/client">
+ <arg value="${client-class}"/>
+ <arg value="${other-args}"/>
+ </exec>
+</target>
+
+<target name="pkg-war">
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/> <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/tmp/wsit/web/WEB-INF/"/>
+ <copy file="${sun-web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
+ failonerror="false"/>
+ <copy verbose="true" toDir="${build.classes.dir}/tmp/WEB-INF/">
+ <fileset dir="${basedir}" includes="weblogic-webservices.xml"/>
+ </copy>
+
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
+ failonerror="false"/>
+ <copy file="${schemafile.location}/${schemafile.name}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${schemafile.name}"
+ failonerror="false"/>
+ <copy file="${catalog.location}/jax-ws-catalog.xml"
+ todir="${build.classes.dir}/tmp/WEB-INF/"
+ failonerror="false"/>
+ <copy file="${web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/web.xml" failonerror="false"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
+ <fileset dir="${war.classes}">
+ <include name="**/*.class"/>
+ <include name="**/${handler.name}"/>
+ </fileset>
+ </copy>
+ <copy toDir="${build.classes.dir}/tmp/wsit/web/WEB-INF" failonerror="false">
+ <fileset dir="${web.wsit.descriptors}"/>
+ </copy>
+ <echo message="Creating war file ${war.file}" level="verbose"/>
+ <jar jarfile="${war.file}" update="true">
+ <fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
+ <include name="**/*class*"/>
+ <include name="**/${handler.name}"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
+ <include name="WEB-INF/web.xml"/>
+ <include name="WEB-INF/sun-web.xml"/>
+ <include name="WEB-INF/webservices.xml"/>
+ <include name="WEB-INF/weblogic-webservices.xml"/>
+ <include name="WEB-INF/jax-ws-catalog.xml"/>
+ <include name="WEB-INF/wsdl/${wsdlfile.name}"/>
+ <include name="WEB-INF/wsdl/${schemafile.name}"/>
+ </fileset>
+ <!-- Put WSIT descriptors under WEB-INF -->
+ <fileset dir="${build.classes.dir}/tmp/wsit/web" casesensitive="true">
+ <include name="WEB-INF/**"/>
+ </fileset>
+ </jar>
+ <echo message="created war file ${war.file}" level="verbose"/>
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <echo message="my webclient war classes are:${webclient.war.classes}"
+ level="verbose"/>
+</target>
+
+<target name="pkg-ejb-jar">
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/> <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/wsit/ejb/META-INF"/>
+ <copy toDir="${build.classes.dir}/tmp/wsit/ejb/META-INF" failonerror="false">
+ <fileset dir="${ejb.wsit.descriptors}"/>
+ </copy>
+ <jar destfile="${jar.file}">
+ <fileset dir="${build.classes.dir}" casesensitive="yes">
+ <include name="${jar.classes}/**"/>
+ </fileset>
+ <!-- Put WSIT descriptors under META-INF -->
+ <fileset dir="${build.classes.dir}/tmp/wsit/ejb" casesensitive="yes">
+ <include name="META-INF/**"/>
+ </fileset>
+ </jar>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.properties
new file mode 100644
index 0000000..a7236f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="libdependent"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.xml
new file mode 100644
index 0000000..31c8a26
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/build.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="libdependent" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="outsidepkg"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/> <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
+ <jar jarfile="${build.classes.dir}/tmp/WEB-INF/lib/dep.jar" update="true">
+ <fileset dir="${build.classes.dir}" casesensitive="yes">
+ <include name="outsidepkg/*class*"/>
+ </fileset>
+ </jar>
+ <copy file="${web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/web.xml" failonerror="false"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
+ <fileset dir="${build.classes.dir}">
+ <include name="endpoint/*.class"/>
+ </fileset>
+ </copy>
+ <echo message="Creating war file ${assemble.dir}/${appname}-web.war" level="verbose"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
+ <include name="**/*class*"/>
+ </fileset>
+ <fileset dir="${build.classes.dir}/tmp/" casesensitive="true">
+ <include name="WEB-INF/web.xml"/>
+ <include name="WEB-INF/lib/*.jar"/>
+ </fileset>
+ </jar>
+ <echo message="created war file ${assemble.dir}/${appname}-web.war" level="verbose"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="libdependent-war"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/client/Client.java
new file mode 100644
index 0000000..0c2f3b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/client/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+import com.example.hello.RetVal;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/libdependent/webservice/HelloService?WSDL")
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ for (int i=0;i<10;i++) {
+ RetVal ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.getRetVal().indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.getRetVal().indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ System.out.println(ret.getRetVal());
+ }
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/endpoint/Hello.java
new file mode 100644
index 0000000..d628903
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/endpoint/Hello.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+import outsidepkg.RetVal;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ public RetVal sayHello(String who) {
+ return new RetVal("WebSvcTest-Hello " + who);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/outsidepkg/RetVal.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/outsidepkg/RetVal.java
new file mode 100644
index 0000000..61cae05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/outsidepkg/RetVal.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 outsidepkg;
+
+public class RetVal {
+ private String value;
+ public RetVal() {}
+ public RetVal(String s) {this.value = s;}
+ public String getRetVal() {return this.value;}
+ public void setRetVal(String s) {this.value=s;}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/web.xml
new file mode 100644
index 0000000..37ce182
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/libdependent/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.properties
new file mode 100644
index 0000000..3942031
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="mappedname"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.xml
new file mode 100644
index 0000000..15b89cc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/build.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+<target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.Client">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/endpointaddress/HelloService"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+
+<target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/mappedname/HelloService?wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/Client.java
new file mode 100644
index 0000000..03c30b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/Client.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ /* private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(name="ignoredName", mappedName="MyMappedName", wsdlLocation="http://HTTP_HOST:HTTP_PORT/Hello/HelloService?WSDL")
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-mapped-name");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-mapped-name");
+ }
+
+ public void doTest(String[] args) {
+ boolean gotEx = false;
+ try {
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+ Object res = ic.lookup("java:comp/env/ignoredName");
+ } catch(Exception ex) {
+ System.out.println("Caught Expected exception - " + ex.getMessage());
+ gotEx = true;
+ }
+ if(!gotEx) {
+ System.out.println("Mapped name not mapped as expected");
+ stat.addStatus("Simple-mapped-name", stat.FAIL);
+ return;
+ }
+ try {
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+ Object res = ic.lookup("java:comp/env/MyMappedName");
+ Hello port = service.getHelloPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("Simple-mapped-name", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("Simple-mapped-name", stat.FAIL);
+ }
+ }
+*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/TestClient.java
new file mode 100644
index 0000000..70f0ad2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("mappedName");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("mappedName-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("MappedName", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("MappedName", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/endpoint/Hello.java
new file mode 100644
index 0000000..92c9f3f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/endpoint/Hello.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public class Hello {
+
+ public String sayHello(String param) {
+ return "Hello " + param;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/web.xml
new file mode 100644
index 0000000..f51ccc0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/webclient/Client.java
new file mode 100644
index 0000000..8ead502
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mappedname/webclient/Client.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef(name="ignoredName", mappedName="MyMappedName", wsdlLocation="http://HTTP_HOST:HTTP_PORT/mappedname/HelloService?WSDL")
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+ Object res = ic.lookup("java:comp/env/MyMappedName");
+ Hello port = service.getHelloPort();
+
+ String ret = port.sayHello("All");
+ System.out.println(ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.properties
new file mode 100644
index 0000000..9cc3607
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="mbyte"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.xml
new file mode 100644
index 0000000..90c48f6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/build.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="mbyte" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/HelloîService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-with-mbyte-char"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/client/Client.java
new file mode 100644
index 0000000..0cb6d7e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/client/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloîService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/mbyte/HelloîService?WSDL")
+ static HelloîService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("service-with-mbyte-char");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("service-with-mbyte-char");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ ret = port.sayDoubleHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Double-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/endpoint/Hello.java
new file mode 100644
index 0000000..5e714f4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mbyte/endpoint/Hello.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="Hello\u00EEService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+
+ @WebMethod(operationName="sayDoubleHello", action="urn:SayHello")
+ public String sayDoubleHello(String who) {
+ return "WebSvcTest-Double-Hello " + who + " AND " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.properties
new file mode 100644
index 0000000..2e64961
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="msgctxt"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.xml
new file mode 100644
index 0000000..9ef15ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Hello2" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+<!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/msgctxt/HelloService?wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/> <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+ </project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-sun-web.xml
new file mode 100644
index 0000000..397457e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client/TestClient.java
new file mode 100644
index 0000000..d903e9e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("msgctxt");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("msgctxt");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("WebSvcTest-Hello All") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("msgctxt", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("msgctxt", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/endpoint/Hello.java
new file mode 100644
index 0000000..9821bf0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/endpoint/Hello.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+
+@WebService
+public class Hello {
+
+ @Resource WebServiceContext wsc;
+
+ public String sayHello(String param) {
+ javax.xml.ws.handler.MessageContext m = wsc.getMessageContext();
+ if(m == null)
+ return "WebService Context injection failed";
+ if(wsc != null)
+ return "WebSvcTest-Hello " + param;
+ return "WebService Context injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/web.xml
new file mode 100644
index 0000000..d4ee4b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/webclient/Client.java
new file mode 100644
index 0000000..5ea3624
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/msgctxt/webclient/Client.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/msgctxt/HelloService?WSDL")
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+
+ try {
+
+ Hello port = service.getHelloPort();
+
+ String ret = port.sayHello("All");
+
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.properties
new file mode 100644
index 0000000..62bc087
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="mtom"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.xml
new file mode 100644
index 0000000..5d582f6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/build.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="mtom" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+
+<path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/mtom/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="sun-web.xml.template" tofile="sun-web.xml"/>
+ <replace file="sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/mtom"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/mtom/SubtractNumbers.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+</javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml.template" tofile="client-sun-web.xml"/>
+ <replace file="client-sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-sun-web.xml.template
new file mode 100644
index 0000000..5b7fb20
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>client.Client/service</service-ref-name>
+ <wsdl-override>%TOKEN%/SubtractNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-web.xml
new file mode 100644
index 0000000..aca69ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client-web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <service-ref>
+ <service-ref-name>client.Client/service</service-ref-name>
+ <service-interface>client.SubtractNumbersService</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>client.SubtractNumbersPortType</service-endpoint-interface>
+ <enable-mtom>true</enable-mtom>
+ </port-component-ref>
+ </service-ref>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client/TestClient.java
new file mode 100644
index 0000000..c58ee53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-mtom-test");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-mtom-test");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[11111]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("MTOM-tests", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("MTOM-tests", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..34a0642
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService (serviceName="junkjunkjunk", portName="SubtractNumbersPortType", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/sun-web.xml.template
new file mode 100644
index 0000000..d69bc6b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-publish-location>%TOKEN%</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webclient/Client.java
new file mode 100644
index 0000000..55da128
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webclient/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ int ret = port.subtractNumbers(22222, 11111);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webservices.xml
new file mode 100644
index 0000000..f8ca485
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/mtom/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/HttpTestService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/HttpTestService.wsdl
new file mode 100644
index 0000000..a9bdfdd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/HttpTestService.wsdl
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="HttpTestService"
+ targetNamespace="http://httptestservice.org/wsdl"
+ xmlns:tns="http://httptestservice.org/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:ns="http://httptestservice.org/types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <schema targetNamespace="http://httptestservice.org/types"
+ xmlns:tns="http://httptestservice.org/types"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="HelloRequest">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="HelloResponse">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Hello1Request">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Hello1Response">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+ <message name="Hello_helloRequest">
+ <part name="parameters" type="ns:HelloRequest"/>
+ </message>
+ <message name="Hello_helloResponse">
+ <part name="result" type="ns:HelloResponse"/>
+ </message>
+ <message name="Hello1_hello1Request">
+ <part name="parameters" type="ns:Hello1Request"/>
+ </message>
+ <message name="Hello1_hello1Response">
+ <part name="result" type="ns:Hello1Response"/>
+ </message>
+ <portType name="Hello">
+ <operation name="hello">
+ <input message="tns:Hello_helloRequest"/>
+ <output message="tns:Hello_helloResponse"/>
+ </operation>
+ </portType>
+ <portType name="Hello1">
+ <operation name="hello1">
+ <input message="tns:Hello1_hello1Request"/>
+ <output message="tns:Hello1_hello1Response"/>
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </output>
+ </operation>
+ </binding>
+ <binding name="Hello1Binding" type="tns:Hello1">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello1">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HttpTestService">
+ <port name="HelloPort" binding="tns:HelloBinding">
+ <soap:address location="http://localhost:8080/wsdltojava/ws4ee"/>
+ </port>
+ <port name="Hello1Port" binding="tns:Hello1Binding">
+ <soap:address location="http://localhost:8080/wsdltojava/ws4ee"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.properties
new file mode 100644
index 0000000..b84ec23
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="multiport"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.xml
new file mode 100644
index 0000000..1ca5214
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="multiport" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="service"/>
+ </antcall>
+ </target>
+
+ <target name="run-wsimport">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/HttpTestService.wsdl -keep -b customservice.xml -d ${build.classes.dir} HttpTestService.wsdl"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, run-wsimport, compile">
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="."/>
+ <param name="wsdlfile.name" value="HttpTestService.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting localWSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -wsdllocation ${env.APS_HOME}/devtests/webservice/annotations/multiport/HttpTestService.wsdl -b customclient.xml -d ${build.classes.dir}/client HttpTestService.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runtest">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="basic-wsdl-to-java-test-case"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/client/Client.java
new file mode 100644
index 0000000..2112bd9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/client/Client.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef static HttpTestService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = new HttpTestService().getHelloPort();
+ HelloRequest req = new HelloRequest();
+ req.setString("From Vijay ");
+ HelloResponse resp = port.hello(req);
+ if(resp.getString().indexOf("From Vijay") == -1) {
+ System.out.println("Unexpected greeting " + resp.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ if(resp.getString().indexOf("Hello1") != -1) {
+ System.out.println("Unexpected greeting " + resp.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ System.out.println(resp.getString());
+ Hello1 port1 = service.getHello1Port();
+ Hello1Request req1 = new Hello1Request();
+ req1.setString("From Vijay ");
+ Hello1Response resp1 = port1.hello1(req1);
+ if(resp1.getString().indexOf("From Vijay") == -1) {
+ System.out.println("Unexpected greeting " + resp1.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ if(resp1.getString().indexOf("Hello1") == -1) {
+ System.out.println("Unexpected greeting " + resp1.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ System.out.println(resp1.getString());
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customclient.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customclient.xml
new file mode 100644
index 0000000..7c3372f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customclient.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="client"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customservice.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customservice.xml
new file mode 100644
index 0000000..242611b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/customservice.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="service"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="service"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/Hello1Impl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/Hello1Impl.java
new file mode 100644
index 0000000..1be5b90
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/Hello1Impl.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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
+ */
+
+/*
+ * %W% %E%
+ */
+
+package service;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+import javax.jws.WebService;
+
+@javax.jws.WebService(
+ serviceName="HttpTestService",
+ endpointInterface="service.Hello1",
+ portName="Hello1Port",
+ targetNamespace="http://httptestservice.org/wsdl",
+ wsdlLocation="WEB-INF/wsdl/HttpTestService.wsdl"
+)
+public class Hello1Impl implements Hello1 {
+
+ public Hello1Response hello1(Hello1Request req) {
+ System.out.println("Hello1, " + req.getString() + "!");
+ Hello1Response resp = new Hello1Response();
+ resp.setString("Hello1, " + req.getString() + "!");
+ return resp;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/HelloImpl.java
new file mode 100644
index 0000000..cc3bf90
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/service/HelloImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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
+ */
+
+/*
+ * %W% %E%
+ */
+
+package service;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+import javax.jws.WebService;
+
+@javax.jws.WebService(
+ serviceName="HttpTestService",
+ endpointInterface="service.Hello",
+ portName="HelloPort",
+ targetNamespace="http://httptestservice.org/wsdl",
+ wsdlLocation="WEB-INF/wsdl/HttpTestService.wsdl"
+)
+public class HelloImpl implements Hello {
+
+ public HelloResponse hello(HelloRequest req) {
+ System.out.println("Hello, " + req.getString() + "!");
+ HelloResponse resp = new HelloResponse();
+ resp.setString("Hello, " + req.getString() + "!");
+ return resp;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/web.xml
new file mode 100644
index 0000000..f3b6cc6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/multiport/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>WSW2JRLHttpTestApp</display-name>
+ <servlet>
+ <servlet-name>HelloImpl</servlet-name>
+ <servlet-class>service.HelloImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloImpl</servlet-name>
+ <url-pattern>/hello</url-pattern>
+ </servlet-mapping>
+ <servlet>
+ <servlet-name>Hello1Impl</servlet-name>
+ <servlet-class>service.Hello1Impl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Hello1Impl</servlet-name>
+ <url-pattern>/hello1</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.properties
new file mode 100644
index 0000000..6ef513a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="noname"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.xml
new file mode 100644
index 0000000..d13f3ed
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/build.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/noname/HelloService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/> <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-sun-web.xml
new file mode 100644
index 0000000..112a489
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client/TestClient.java
new file mode 100644
index 0000000..e7ee4a2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("noName");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("noname");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("WebSvcTest-Hello All") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("noName", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("noName", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/endpoint/Hello.java
new file mode 100644
index 0000000..7c48d53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/endpoint/Hello.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public class Hello {
+
+ public String sayHello(String param) {
+ return "WebSvcTest-Hello " + param;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/web.xml
new file mode 100644
index 0000000..f51ccc0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/webclient/Client.java
new file mode 100644
index 0000000..2c58b8d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname/webclient/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+
+ Hello port = service.getHelloPort();
+
+ String ret = port.sayHello("All");
+ System.out.println(ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.properties
new file mode 100644
index 0000000..ad2d4ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="noname2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.xml
new file mode 100644
index 0000000..9d8596a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/build.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Hello2" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/noname2/HelloService?wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" token="HTTP_HOST" value="${http.host}"/>
+ <replace file="webclient/Client.java" token="HTTP_PORT" value="${http.port}"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/> <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+ </project>
+
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client/TestClient.java
new file mode 100644
index 0000000..6a9a5ba
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("noName2");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("noname2");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ //This shows annotation overrides svcname
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("WebSvcTest-Hello All") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("noName2", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("noName2", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/endpoint/Hello2.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/endpoint/Hello2.java
new file mode 100644
index 0000000..0770bab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/endpoint/Hello2.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ portName="Hello"
+)
+public class Hello2 {
+
+ public String sayHello(String param) {
+ return "WebSvcTest-Hello " + param;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/web.xml
new file mode 100644
index 0000000..0c458f4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello2</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/webclient/Client.java
new file mode 100644
index 0000000..49d5ac9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/noname2/webclient/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef( wsdlLocation="http://HTTP_HOST:HTTP_PORT/noname2/HelloService?WSDL")
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+
+ Hello port = service.getHello();
+
+ String ret = port.sayHello("All");
+ System.out.println(ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.properties
new file mode 100644
index 0000000..91e9125
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="nowebxml"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.xml
new file mode 100644
index 0000000..5bd34fd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/build.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="nowebxml" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-with-no-webxml"/>
+ </antcall>
+
+
+<!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/client/Client.java
new file mode 100644
index 0000000..4515283
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/client/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/nowebxml/HelloService?WSDL")
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("service-with-no-webxml");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("service-with-no-webxml");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ ret = port.sayDoubleHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Double-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/endpoint/Hello.java
new file mode 100644
index 0000000..1cdf3b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/nowebxml/endpoint/Hello.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+
+ @WebMethod(operationName="sayDoubleHello", action="urn:SayHello")
+ public String sayDoubleHello(String who) {
+ return "WebSvcTest-Double-Hello " + who + " AND " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.properties
new file mode 100644
index 0000000..7338cee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="oneway"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.xml
new file mode 100644
index 0000000..4fca5d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/build.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Hello2" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/oneway/HelloService?wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/> <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+ </project>
+
+
+<!--
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="run-client">
+ <echo message="Deployed passed"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+</project>
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client/TestClient.java
new file mode 100644
index 0000000..615876c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("oneway");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("oneway");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("Oneway works") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("oneway", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("oneway", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/endpoint/Hello.java
new file mode 100644
index 0000000..ab5afae
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/endpoint/Hello.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService
+public class Hello {
+
+ @WebMethod
+ @Oneway
+ public void sayHello(String name) {
+ System.out.println( "Hello, " + name + "!");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/web.xml
new file mode 100644
index 0000000..d4ee4b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/webclient/Client.java
new file mode 100644
index 0000000..6907dc1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/oneway/webclient/Client.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/oneway/HelloService?WSDL")
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ String ret="Oneway works";
+ try {
+
+ Hello port = service.getHelloPort();
+
+ port.sayHello("All");
+
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ ret = "Oneway fails with " + e.toString();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.properties
new file mode 100644
index 0000000..2dc16cd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="pkghello"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.xml
new file mode 100644
index 0000000..c185234
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/build.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="pkgedwarservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, restart-test, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="run-wsgen">
+ <antcall target="wsgen">
+ <param name="wsgen.args"
+ value="-wsdl -servicename {http://example.com/Hello}HelloService -portname {http://example.com/Hello}MyPort -cp ${build.classes.dir} -keep -d ${build.classes.dir} endpoint.Hello"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile, run-wsgen">
+ <antcall target="pkg-war">
+ <param name="schemafile.location" value="${build.classes.dir}"/>
+ <param name="schemafile.name" value="HelloService_schema1.xsd"/>
+ <param name="wsdlfile.location" value="${build.classes.dir}"/>
+ <param name="wsdlfile.name" value="HelloService.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+<replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-with-packaged-wsdl-and-schema"/>
+ </antcall>
+
+<!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/client/Client.java
new file mode 100644
index 0000000..f3292e0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/pkghello/webservice/HelloService?WSDL")
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getMyPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("Pkged-War-Service", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/endpoint/Hello.java
new file mode 100644
index 0000000..9ea1682
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/endpoint/Hello.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ portName="MyPort",
+ targetNamespace="http://example.com/Hello",
+ wsdlLocation="WEB-INF/wsdl/HelloService.wsdl"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/sun-web.xml
new file mode 100644
index 0000000..1e08212
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/sun-web.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+
+<sun-web-app>
+ <context-root>pkghello</context-root>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/web.xml
new file mode 100644
index 0000000..37ce182
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/pkgedwarservice/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.properties
new file mode 100644
index 0000000..c944cbc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.properties
@@ -0,0 +1,25 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="postconstruct"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.xml
new file mode 100644
index 0000000..c93cedc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/build.xml
@@ -0,0 +1,215 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Hello2" default="core" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+
+ <target name="all" depends="clean, setup, runtest1, undeploy"/>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/postconstruct/webservice/HelloService?wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/> <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+ </project>
+
+
+<!--
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="postconstruct" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, restart-test, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-with-postconstruct-annotation"/>
+ </antcall>
+ </target>
+</project>
+-->
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client/TestClient.java
new file mode 100644
index 0000000..e458f36
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("postcontruct");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("postcontruct");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("WebSvcTest-Hello All postconstruct called") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("postconstruct", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("postconstruct", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/endpoint/Hello.java
new file mode 100644
index 0000000..f51e02b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/endpoint/Hello.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.annotation.PostConstruct;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ String str = "postconstruct NOT called";
+
+ public Hello() {}
+
+ @PostConstruct
+ public void postConstMethod() { str = "postconstruct called"; }
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who + " " + str;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/web.xml
new file mode 100644
index 0000000..8faeb07
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/webclient/Client.java
new file mode 100644
index 0000000..fdec9d8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/postconstruct/webclient/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/postconstruct/webservice/HelloService?WSDL")
+ HelloService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+
+ Hello port = service.getHelloPort();
+
+ String ret = port.sayHello("All");
+ System.out.println(ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl
new file mode 100644
index 0000000..d78559c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="AddNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="addNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbersResponse" type="tns:addNumbersResponse" />
+
+ <complexType name="addNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbers" type="tns:addNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="addNumbers">
+ <part name="parameters" element="tns:addNumbers" />
+ </message>
+ <message name="addNumbersResponse">
+ <part name="result" element="tns:addNumbersResponse" />
+ </message>
+ <portType name="AddNumbersPortType">
+ <operation name="addNumbers">
+ <input message="tns:addNumbers" name="add"/>
+ <output message="tns:addNumbersResponse" name="addResponse"/>
+ </operation>
+ </portType>
+ <binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="addNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="AddNumbersService">
+ <port name="AddNumbersPortType" binding="tns:AddNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/Client.java
new file mode 100644
index 0000000..33ab43c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/Client.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import javax.xml.ws.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(name="service/MyService") static AddNumbersService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ AddNumbersPortType port = service.getAddNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://localhost:8080/prepkged-svc-1/webservice/AddNumbersService?WSDL");
+ int ret = port.addNumbers(100, 200);
+ if(ret != 300) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("pre-pkged-appclient", stat.FAIL);
+ return;
+ }
+ System.out.println("Add result = " + ret);
+ stat.addStatus("pre-pkged-appclient", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("pre-pkged-appclient", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/MANIFEST.MF
new file mode 100644
index 0000000..0fb13ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/appclient/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: client.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/application-client.xml
new file mode 100644
index 0000000..fb22799
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/application-client.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.properties
new file mode 100644
index 0000000..3f670b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.properties
@@ -0,0 +1,29 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="prepkged-svc-1"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="application-client.xml" value="application-client.xml"/>
+<property name="sun-application-client.xml" value="sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}/appclient"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.xml
new file mode 100644
index 0000000..a5efa8b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/build.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="prepkged-svc-1" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, assemble-appclient, deploy-app, deploy-client, deploy-appclient"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/AddNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="sun-web.xml.template" tofile="sun-web.xml"/>
+ <replace file="sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/prepkged-svc-1"/>
+ <param name="wsdlfile.name" value="AddNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+</javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml.template" tofile="client-sun-web.xml"/>
+ <replace file="client-sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="assemble-appclient" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/appclient"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/appclient ${env.APS_HOME}/devtests/webservice/annotations/prepkged-svc-1/AddNumbers.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/appclient"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="appclient/**"/>
+ <mkdir dir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <copy file="AddNumbers.wsdl" todir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/appclient"/>
+ <copy file="${application-client.xml}" tofile="${build.classes.dir}/META-INF/application-client.xml" failonerror="false"/>
+ <copy file="sun-application-client.xml.template" tofile="sun-application-client.xml"/>
+ <replace file="${sun-application-client.xml}">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml" failonerror="false"/>
+ <jar jarfile="${assemble.dir}/${appname}-client.jar" manifest="./appclient/MANIFEST.MF">
+ <fileset dir="${build.classes.dir}/appclient">
+ <include name="**"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-appclient">
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-sun-web.xml.template
new file mode 100644
index 0000000..f4b4095
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-web.xml
new file mode 100644
index 0000000..e691a89
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client-web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <welcome-file-list>
+ <welcome-file>/index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client/TestClient.java
new file mode 100644
index 0000000..11392d9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-prepkged-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF ADD SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[300]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("prepkged-with-annotation-only", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("prepkged-with-annotation-only", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-client.xml
new file mode 100644
index 0000000..6a135ad
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-server.xml
new file mode 100644
index 0000000..4cfbb59
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..501cc53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/endpoint/AddNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService (wsdlLocation="WEB-INF/wsdl/AddNumbers.wsdl", serviceName="AddNumbersService", targetNamespace="http://duke.org", portName="AddNumbersPortType", endpointInterface="endpoint.AddNumbersPortType")
+public class AddNumbersImpl implements AddNumbersPortType {
+
+ public int addNumbers (int number1, int number2) {
+ return number1 + number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-application-client.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-application-client.xml.template
new file mode 100644
index 0000000..029d0d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-application-client.xml.template
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 5//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_5-0.dtd">
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-web.xml.template
new file mode 100644
index 0000000..03a42d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <wsdl-publish-location>%TOKEN%</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/web.xml
new file mode 100644
index 0000000..6256153
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>AddNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for AddNumbers Web Service</description>
+ <display-name>AddNumbersWebService</display-name>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AddNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/webclient/Client.java
new file mode 100644
index 0000000..518f816
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/prepkged-svc-1/webclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="service/MyService") AddNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ AddNumbersPortType port = service.getAddNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://localhost:8080/prepkged-svc-1/webservice/AddNumbersService?WSDL");
+ int ret = port.addNumbers(100, 200);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF ADD SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/build.xml
new file mode 100644
index 0000000..f534777
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../../ejb_annotations/annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <target name="all" depends="clean">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="test-compile"/>
+ <war destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war" needxmlfile="false">
+ <webinf dir="${pkg-name}"
+ includes="*.xml **/*.wsdl **/*.xsd"/>
+ <classes dir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/**"/>
+ </war>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </condition>
+
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <antcall target="compile-client"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
+ </exec>
+ <antcall target="unjar-client-utils"/>
+ <antcall target="internal-run"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="${server}.war"/>
+ </antcall>
+ <condition property="undeploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployFailed"/>
+ </condition>
+ <fail if="undeploy_failed" message="undeployment failed"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="test_build">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="build"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/client/Client.java
new file mode 100644
index 0000000..faaa3b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/client/Client.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.jaxws.HelloImplService;
+import endpoint.jaxws.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public static void main(String[] args) {
+ stat.addDescription("servlet-provider-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("servlet-provider-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = new HelloImplService().getHelloImpl();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("servlet-provider-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("servlet-provider-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/HelloImpl.java
new file mode 100644
index 0000000..f2dac26
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/HelloImpl.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.*;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceProvider;
+import javax.ejb.Stateless;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.ws.WebServiceException;
+
+
+import endpoint.jaxws.*;
+
+@WebServiceProvider(serviceName = "HelloImplService", portName = "HelloImpl", targetNamespace = "http://endpoint/jaxws", wsdlLocation = "HelloImplService.wsdl")
+@Stateless
+public class HelloImpl implements Provider<Source> {
+
+ private static final JAXBContext jaxbContext = createJAXBContext();
+ private int combo;
+ private int bodyIndex;
+
+ public javax.xml.bind.JAXBContext getJAXBContext() {
+ return jaxbContext;
+ }
+
+ private static javax.xml.bind.JAXBContext createJAXBContext() {
+ try {
+ return javax.xml.bind.JAXBContext.newInstance(ObjectFactory.class);
+ } catch (javax.xml.bind.JAXBException e) {
+ throw new WebServiceException(e.getMessage(), e);
+ }
+ }
+
+ public Source invoke(Source request) {
+ try {
+ recvBean(request);
+ return sendBean();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new WebServiceException("Provider endpoint failed", e);
+ }
+ }
+
+ private void recvBean(Source source) throws Exception {
+ System.out.println("**** recvBean ******");
+ JAXBElement element = (JAXBElement) jaxbContext.createUnmarshaller().unmarshal(source);
+ System.out.println("name=" + element.getName() + " value=" + element.getValue());
+ if (element.getValue() instanceof SayHello) {
+ SayHello hello = (SayHello) element.getValue();
+ System.out.println("Say Hello from " + hello.getArg0());
+ }
+
+ }
+
+ private Source sendBean() throws Exception {
+ System.out.println("**** sendBean ******");
+ SayHelloResponse resp = new SayHelloResponse();
+ resp.setReturn("WebSvcTest-Hello");
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectFactory factory = new ObjectFactory();
+ jaxbContext.createMarshaller().marshal(factory.createSayHelloResponse(resp), bout);
+ return new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/HelloImplService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/HelloImplService.wsdl
new file mode 100644
index 0000000..4d0f6a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/HelloImplService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HelloImplService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="HelloImpl">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloImplBinding" type="tns:HelloImpl">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloImplService">
+ <port name="HelloImpl" binding="tns:HelloImplBinding">
+ <soap:address location="REPLACE_WITH_VALID_URL" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/schema1.xsd
new file mode 100644
index 0000000..f207ad7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider-ejbinweb/endpoint/wsdl/schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/build.xml
new file mode 100644
index 0000000..82d33ce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../../ejb_annotations/annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <target name="all" depends="clean">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="test-compile"/>
+ <war destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war"
+ webxml="web.xml">
+ <webinf dir="${pkg-name}"
+ includes="*.xml **/*.wsdl **/*.xsd"/>
+ <classes dir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/**"/>
+ </war>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </condition>
+
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <antcall target="compile-client"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
+ </exec>
+ <antcall target="unjar-client-utils"/>
+ <antcall target="internal-run"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="${server}.war"/>
+ </antcall>
+ <condition property="undeploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployFailed"/>
+ </condition>
+ <fail if="undeploy_failed" message="undeployment failed"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="test_build">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="build"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/client/Client.java
new file mode 100644
index 0000000..faaa3b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/client/Client.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.jaxws.HelloImplService;
+import endpoint.jaxws.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public static void main(String[] args) {
+ stat.addDescription("servlet-provider-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("servlet-provider-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = new HelloImplService().getHelloImpl();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("servlet-provider-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("servlet-provider-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/HelloImpl.java
new file mode 100644
index 0000000..b6694f5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/HelloImpl.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.*;
+import java.util.Map;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.Service ;
+import javax.xml.soap.SOAPMessage;
+import javax.ejb.Stateless;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.ws.WebServiceException;
+
+
+import endpoint.jaxws.*;
+
+@WebServiceProvider(serviceName="HelloImplService", portName="HelloImpl", targetNamespace="http://endpoint/jaxws", wsdlLocation="HelloImplService.wsdl")
+public class HelloImpl implements Provider<Source> {
+
+ private static final JAXBContext jaxbContext = createJAXBContext();
+ private int combo;
+ private int bodyIndex;
+
+ public javax.xml.bind.JAXBContext getJAXBContext(){
+ return jaxbContext;
+ }
+
+ private static javax.xml.bind.JAXBContext createJAXBContext(){
+ try{
+ return javax.xml.bind.JAXBContext.newInstance(ObjectFactory.class);
+ }catch(javax.xml.bind.JAXBException e){
+ throw new WebServiceException(e.getMessage(), e);
+ }
+ }
+
+
+ public Source invoke(Source request) {
+ try {
+ recvBean(request);
+ return sendBean();
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new WebServiceException("Provider endpoint failed", e);
+ }
+ }
+
+ private void recvBean(Source source) throws Exception {
+ System.out.println("**** recvBean ******");
+ JAXBElement element = (JAXBElement) jaxbContext.createUnmarshaller().unmarshal(source);
+ System.out.println("name="+element.getName()+ " value=" + element.getValue());
+ if (element.getValue() instanceof SayHello) {
+ SayHello hello = (SayHello) element.getValue();
+ System.out.println("Say Hello from " + hello.getArg0());
+ }
+
+ }
+
+ private Source sendBean() throws Exception {
+ System.out.println("**** sendBean ******");
+ SayHelloResponse resp = new SayHelloResponse();
+ resp.setReturn("WebSvcTest-Hello");
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectFactory factory = new ObjectFactory();
+ jaxbContext.createMarshaller().marshal(factory.createSayHelloResponse(resp), bout);
+ return new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/HelloImplService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/HelloImplService.wsdl
new file mode 100644
index 0000000..4d0f6a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/HelloImplService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HelloImplService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="HelloImpl">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloImplBinding" type="tns:HelloImpl">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloImplService">
+ <port name="HelloImpl" binding="tns:HelloImplBinding">
+ <soap:address location="REPLACE_WITH_VALID_URL" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/schema1.xsd
new file mode 100644
index 0000000..f207ad7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/endpoint/wsdl/schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/web.xml
new file mode 100644
index 0000000..5b8db0c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/provider/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>endpoint.HelloImpl</servlet-name>
+ <servlet-class>endpoint.HelloImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>endpoint.HelloImpl</servlet-name>
+ <url-pattern>/HelloImplService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/build.xml
new file mode 100644
index 0000000..82d33ce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../../ejb_annotations/annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <target name="all" depends="clean">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="test-compile"/>
+ <war destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war"
+ webxml="web.xml">
+ <webinf dir="${pkg-name}"
+ includes="*.xml **/*.wsdl **/*.xsd"/>
+ <classes dir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/**"/>
+ </war>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.war_deployFailed"/>
+ </condition>
+
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <antcall target="compile-client"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/${server}/${server}Service?WSDL"/>
+ </exec>
+ <antcall target="unjar-client-utils"/>
+ <antcall target="internal-run"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="${server}.war"/>
+ </antcall>
+ <condition property="undeploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployFailed"/>
+ </condition>
+ <fail if="undeploy_failed" message="undeployment failed"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="test_build">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="build"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/client/Client.java
new file mode 100644
index 0000000..d29cf2f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.jaxws.HelloImplService;
+import endpoint.jaxws.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/HelloImpl/HelloImplService?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("servlet-provider-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("servlet-provider-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImpl();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("injectedValue Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("servlet-provider-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("servlet-provider-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/HelloImpl.java
new file mode 100644
index 0000000..c1490ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/HelloImpl.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.*;
+import java.util.Map;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.Service ;
+import javax.xml.soap.SOAPMessage;
+import javax.ejb.Stateless;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.ws.WebServiceException;
+
+
+import endpoint.jaxws.*;
+
+@WebServiceProvider(serviceName="HelloImplService", portName="HelloImpl", targetNamespace="http://endpoint/jaxws", wsdlLocation="HelloImplService.wsdl")
+@javax.jws.HandlerChain(name="some name", file="WEB-INF/myhandler.xml")
+public class HelloImpl implements Provider<Source> {
+
+ private static final JAXBContext jaxbContext = createJAXBContext();
+ private int combo;
+ private int bodyIndex;
+
+ public javax.xml.bind.JAXBContext getJAXBContext(){
+ return jaxbContext;
+ }
+
+ private static javax.xml.bind.JAXBContext createJAXBContext(){
+ try{
+ return javax.xml.bind.JAXBContext.newInstance(ObjectFactory.class);
+ }catch(javax.xml.bind.JAXBException e){
+ throw new WebServiceException(e.getMessage(), e);
+ }
+ }
+
+
+ public Source invoke(Source request) {
+ try {
+ recvBean(request);
+ return sendBean();
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new WebServiceException("Provider endpoint failed", e);
+ }
+ }
+
+ private void recvBean(Source source) throws Exception {
+ System.out.println("**** recvBean ******");
+ System.out.println(jaxbContext.createUnmarshaller().unmarshal(source));
+ JAXBElement element = (JAXBElement) jaxbContext.createUnmarshaller().unmarshal(source);
+ System.out.println("name="+element.getName()+ " value=" + element.getValue());
+ if (element.getValue() instanceof SayHello) {
+ SayHello hello = (SayHello) element.getValue();
+ System.out.println("Say Hello from " + hello.getArg0());
+ }
+
+ }
+
+ private Source sendBean() throws Exception {
+ System.out.println("**** sendBean ******");
+ SayHelloResponse resp = new SayHelloResponse();
+ resp.setReturn("WebSvcTest-Hello");
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectFactory factory = new ObjectFactory();
+ jaxbContext.createMarshaller().marshal(factory.createSayHelloResponse(resp), bout);
+ return new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/TestHandler.java
new file mode 100644
index 0000000..41508fb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/TestHandler.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+import javax.annotation.PostConstruct;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ if ("PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ } else {
+ System.out.println("injectedString = " + injectedString);
+ }
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ paramElement.setValue(injectedString + " " + paramElement.getValue());
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/myhandler.xml
new file mode 100644
index 0000000..9b79e5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/myhandler.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>endpoint.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/HelloImplService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/HelloImplService.wsdl
new file mode 100644
index 0000000..4d0f6a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/HelloImplService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HelloImplService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="HelloImpl">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloImplBinding" type="tns:HelloImpl">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloImplService">
+ <port name="HelloImpl" binding="tns:HelloImplBinding">
+ <soap:address location="REPLACE_WITH_VALID_URL" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/schema1.xsd
new file mode 100644
index 0000000..f207ad7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/endpoint/wsdl/schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/web.xml
new file mode 100644
index 0000000..22e5c8b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/providerhandler/web.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>endpoint.HelloImpl</servlet-name>
+ <servlet-class>endpoint.HelloImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>endpoint.HelloImpl</servlet-name>
+ <url-pattern>/HelloImplService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.properties
new file mode 100644
index 0000000..4f5df04
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="restful-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.xml
new file mode 100644
index 0000000..1f6648f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/build.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="restful-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="restful-svc-2"/>
+ </antcall>
+
+<!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/client/Client.java
new file mode 100644
index 0000000..85dc13c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/client/Client.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+
+import org.w3c.dom.Node;
+
+import java.net.URL;
+import java.net.URI;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.http.HTTPBinding;
+import java.io.ByteArrayOutputStream;
+import java.util.Properties;
+import java.util.Map;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static final QName serviceQName = new QName("http://duke.org", "AddNumbersService");
+ private static final QName portQName = new QName("http://duke.org", "AddNumbersPort");
+
+ private static String endpointAddress =
+ "http://HTTP_HOST:HTTP_PORT/restful-2/webservice/AddNumbersService";
+ private static String queryString = "num1=30&num2=20";
+
+ public static void main (String[] args) throws Exception {
+ stat.addDescription("webservices-simple-restful-svc");
+ Client client = new Client();
+ Service service = client.createService();
+ URI endpointURI = new URI(endpointAddress);
+ String path = null;
+ String query = null;
+ if (endpointURI != null){
+ path = endpointURI.getPath();
+ query = endpointURI.getQuery();
+ }
+ service.addPort(portQName, HTTPBinding.HTTP_BINDING, endpointAddress);
+ Dispatch<Source> d = service.createDispatch(portQName, Source.class, Service.Mode.MESSAGE);
+ Map<String, Object> requestContext = d.getRequestContext();
+ requestContext.put(MessageContext.HTTP_REQUEST_METHOD, new String("GET"));
+ requestContext.put(MessageContext.QUERY_STRING, queryString);
+ requestContext.put(MessageContext.PATH_INFO, path);
+ System.out.println ("Invoking Restful GET Request with query string " + queryString);
+ Source result = d.invoke(null);
+ printSource(result);
+ stat.printSummary("webservices-simple-restful-svc");
+ }
+
+ private Service createService() {
+ Service service = Service.create(serviceQName);
+ return service;
+ }
+
+ private static void printSource(Source source) {
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ StreamResult sr = new StreamResult(bos);
+ Transformer trans = TransformerFactory.newInstance().newTransformer();
+ Properties oprops = new Properties();
+ oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ trans.setOutputProperties(oprops);
+ trans.transform(source, sr);
+ String resp = bos.toString();
+ System.out.println("**** Response ******"+resp);
+ bos.close();
+ if(resp.indexOf("<ns:return>50</ns:return>") != -1)
+ stat.addStatus("restful-svc-2", stat.PASS);
+ else
+ stat.addStatus("restful-svc-2", stat.FAIL);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..4d25ecc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/endpoint/AddNumbersImpl.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.ByteArrayInputStream;
+import java.util.StringTokenizer;
+
+import javax.annotation.Resource;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.http.HTTPException;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.BindingType;
+
+@WebServiceProvider
+@BindingType(value=HTTPBinding.HTTP_BINDING)
+public class AddNumbersImpl implements Provider<Source> {
+
+ @Resource
+ protected WebServiceContext wsContext;
+
+ public Source invoke(Source source) {
+ try {
+ MessageContext mc = wsContext.getMessageContext();
+ String query = (String)mc.get(MessageContext.QUERY_STRING);
+ String path = (String)mc.get(MessageContext.PATH_INFO);
+ System.out.println("Query String = "+query);
+ System.out.println("PathInfo = "+path);
+ if (query != null && query.contains("num1=") &&
+ query.contains("num2=")) {
+ return createSource(query);
+ } else if (path != null && path.contains("/num1") &&
+ path.contains("/num2")) {
+ return createSource(path);
+ } else {
+ throw new HTTPException(404);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new HTTPException(500);
+ }
+ }
+
+ private Source createSource(String str) {
+ StringTokenizer st = new StringTokenizer(str, "=&/");
+ String token = st.nextToken();
+ int number1 = Integer.parseInt(st.nextToken());
+ st.nextToken();
+ int number2 = Integer.parseInt(st.nextToken());
+ int sum = number1+number2;
+ String body =
+ "<ns:addNumbersResponse xmlns:ns=\"http://duke.org\"><ns:return>"
+ +sum
+ +"</ns:return></ns:addNumbersResponse>";
+ Source source = new StreamSource(
+ new ByteArrayInputStream(body.getBytes()));
+ return source;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/web.xml
new file mode 100644
index 0000000..2ff674f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful-2/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Restful Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <servlet-name>endpoint.AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>endpoint.AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AddNumbersService</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.properties
new file mode 100644
index 0000000..eed198b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="restful"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.xml
new file mode 100644
index 0000000..0c7b5c7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/build.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="restful" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+<replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+
+
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="restful-svc-1"/>
+ </antcall>
+
+
+<!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/client/Client.java
new file mode 100644
index 0000000..2316410
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/client/Client.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+import org.w3c.dom.Node;
+import java.net.URL;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamResult;
+import java.io.ByteArrayOutputStream;
+import java.util.Properties;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) throws Exception {
+ stat.addDescription("webservices-simple-restful-svc");
+ String endpointAddress =
+ "http://HTTP_HOST:HTTP_PORT/restful/webservice/AddNumbersService";
+ URL url = new URL(endpointAddress+"?num1=10&num2=20");
+ System.out.println ("Invoking URL="+url);
+ process(url, args);
+ stat.printSummary("webservices-simple-restful-svc");
+ }
+
+ private static void process(URL url, String[] args) throws Exception {
+ InputStream in = url.openStream();
+ StreamSource source = new StreamSource(in);
+ printSource(source, args);
+ }
+
+ private static void printSource(Source source, String[] args) {
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ StreamResult sr = new StreamResult(bos );
+ Transformer trans = TransformerFactory.newInstance().newTransformer();
+ Properties oprops = new Properties();
+ oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ trans.setOutputProperties(oprops);
+ trans.transform(source, sr);
+ String resp = bos.toString();
+ System.out.println("**** Response ******"+resp);
+ bos.close();
+ if(resp.indexOf("<ns:return>30</ns:return>") != -1)
+ stat.addStatus(args[0], stat.PASS);
+ else
+ stat.addStatus(args[0], stat.FAIL);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..4d25ecc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/endpoint/AddNumbersImpl.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.ByteArrayInputStream;
+import java.util.StringTokenizer;
+
+import javax.annotation.Resource;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.http.HTTPException;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.BindingType;
+
+@WebServiceProvider
+@BindingType(value=HTTPBinding.HTTP_BINDING)
+public class AddNumbersImpl implements Provider<Source> {
+
+ @Resource
+ protected WebServiceContext wsContext;
+
+ public Source invoke(Source source) {
+ try {
+ MessageContext mc = wsContext.getMessageContext();
+ String query = (String)mc.get(MessageContext.QUERY_STRING);
+ String path = (String)mc.get(MessageContext.PATH_INFO);
+ System.out.println("Query String = "+query);
+ System.out.println("PathInfo = "+path);
+ if (query != null && query.contains("num1=") &&
+ query.contains("num2=")) {
+ return createSource(query);
+ } else if (path != null && path.contains("/num1") &&
+ path.contains("/num2")) {
+ return createSource(path);
+ } else {
+ throw new HTTPException(404);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new HTTPException(500);
+ }
+ }
+
+ private Source createSource(String str) {
+ StringTokenizer st = new StringTokenizer(str, "=&/");
+ String token = st.nextToken();
+ int number1 = Integer.parseInt(st.nextToken());
+ st.nextToken();
+ int number2 = Integer.parseInt(st.nextToken());
+ int sum = number1+number2;
+ String body =
+ "<ns:addNumbersResponse xmlns:ns=\"http://duke.org\"><ns:return>"
+ +sum
+ +"</ns:return></ns:addNumbersResponse>";
+ Source source = new StreamSource(
+ new ByteArrayInputStream(body.getBytes()));
+ return source;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/web.xml
new file mode 100644
index 0000000..2ff674f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/restful/web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Restful Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <servlet-name>endpoint.AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>endpoint.AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AddNumbersService</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/AddNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/AddNumbers.wsdl
new file mode 100644
index 0000000..8a06049
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/AddNumbers.wsdl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="AddNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="addNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbersResponse" type="tns:addNumbersResponse" />
+
+ <complexType name="addNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbers" type="tns:addNumbers" />
+
+ </xsd:schema>
+ </types>
+ <message name="addNumbers">
+ <part name="parameters" element="tns:addNumbers" />
+ </message>
+ <message name="addNumbersResponse">
+ <part name="result" element="tns:addNumbersResponse" />
+ </message>
+ <portType name="AddNumbersPortType">
+ <operation name="addNumbers">
+ <input message="tns:addNumbers" />
+ <output message="tns:addNumbersResponse" />
+ </operation>
+ </portType>
+ <binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
+ <soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+ <operation name="addNumbers">
+ <soap12:operation soapAction="" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="AddNumbersService">
+ <port name="AddNumbersPort" binding="tns:AddNumbersBinding">
+ <soap12:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/Client.java
new file mode 100644
index 0000000..6478cee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/Client.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import javax.xml.ws.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(name="service/MyService") static AddNumbersService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ AddNumbersPortType port = service.getAddNumbersPort();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/soap12/webservice/AddNumbersService?WSDL");
+ int ret = port.addNumbers(100, 200);
+ if(ret != 300) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("soap12", stat.FAIL);
+ return;
+ }
+ System.out.println("Add result = " + ret);
+ stat.addStatus("soap12", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("soap12", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/MANIFEST.MF
new file mode 100644
index 0000000..0fb13ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/appclient/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: client.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/application-client.xml
new file mode 100644
index 0000000..fb22799
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/application-client.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.properties
new file mode 100644
index 0000000..d496838
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.properties
@@ -0,0 +1,29 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="soap12"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="application-client.xml" value="application-client.xml"/>
+<property name="sun-application-client.xml" value="sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}/appclient"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.xml
new file mode 100644
index 0000000..555790c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/build.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="soap12" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-appclient, deploy-app, deploy-appclient"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/AddNumbers.wsdl -extension -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/soap12/AddNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="sun-web.xml.template" tofile="sun-web.xml"/>
+ <replace file="sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/soap12"/>
+ <param name="wsdlfile.name" value="AddNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-appclient" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/appclient"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -extension -keep -d ${build.classes.dir}/appclient ${env.APS_HOME}/devtests/webservice/annotations/soap12/AddNumbers.wsdl"/>
+ </antcall>
+ <replace file="appclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="appclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/appclient"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="appclient/**"/>
+ <mkdir dir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <copy file="AddNumbers.wsdl" todir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/appclient"/>
+ <copy file="${application-client.xml}" tofile="${build.classes.dir}/META-INF/application-client.xml" failonerror="false"/>
+ <copy file="sun-application-client.xml.template" tofile="sun-application-client.xml"/>
+ <replace file="${sun-application-client.xml}">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml" failonerror="false"/>
+ <jar jarfile="${assemble.dir}/${appname}-client.jar" manifest="./appclient/MANIFEST.MF">
+ <fileset dir="${build.classes.dir}/appclient">
+ <include name="**"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-appclient">
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}"/>
+ </antcall>
+
+ <replace file="appclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="appclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/client-sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/client-sun-web.xml.template
new file mode 100644
index 0000000..f4b4095
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/client-sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-client.xml
new file mode 100644
index 0000000..6a135ad
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-server.xml
new file mode 100644
index 0000000..4cfbb59
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..6fa9f29
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/endpoint/AddNumbersImpl.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.xml.ws.BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
+@javax.jws.WebService (wsdlLocation="WEB-INF/wsdl/AddNumbers.wsdl", serviceName="AddNumbersService", targetNamespace="http://duke.org", portName="AddNumbersPort", endpointInterface="endpoint.AddNumbersPortType")
+public class AddNumbersImpl implements AddNumbersPortType {
+
+ public int addNumbers (int number1, int number2) {
+ return number1 + number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-application-client.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-application-client.xml.template
new file mode 100644
index 0000000..029d0d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-application-client.xml.template
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 5//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_5-0.dtd">
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-web.xml.template
new file mode 100644
index 0000000..03a42d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <wsdl-publish-location>%TOKEN%</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/web.xml
new file mode 100644
index 0000000..6256153
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soap12/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>AddNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for AddNumbers Web Service</description>
+ <display-name>AddNumbersWebService</display-name>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AddNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.properties
new file mode 100644
index 0000000..3b23424
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="soaptcp"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="ejb.wsit.descriptors" value="./etc/ejb"/>
+<property name="web.wsit.descriptors" value="./etc/web"/>
+<property name="client.wsit.descriptors" value="./etc/client"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.xml
new file mode 100644
index 0000000..e4f0916
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservicerefs" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="client-classpath">
+ <pathelement path="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/j2ee.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/webservices-rt.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/webservices-tools.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/activation.jar"/>
+ <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
+ </path>
+
+ <target name="all" depends="clean, setup-web, clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-web" depends="assemble-web, deploy-web-app"/>
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="ejb_endpoint"/>
+ </antcall>
+ <copy toDir="${build.classes.dir}">
+ <fileset dir="${ejb.wsit.descriptors}"/>
+ </copy>
+ <antcall target="pkg-ejb-jar">
+ <param name="jar.classes" value="ejb_endpoint/**"/>
+ <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web">
+ <antcall target="compile-common">
+ <param name="src" value="servlet_endpoint"/>
+ </antcall>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/>
+ </antcall>
+ <echo message="wsimporting http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ includes="client/**">
+ <classpath refid="client-classpath"/>
+ </javac>
+ <copy toDir="${build.classes.dir}/client">
+ <fileset dir="${client.wsit.descriptors}"/>
+ </copy>
+ </target>
+
+ <target name="deploy-web-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-ejb-jar">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="${http.host} ${http.port} soap-tcp"/>
+ </antcall>
+ </target>
+
+ <target name="runclient-standalone">
+ <echo message="running client: client.Client dir: ${build.classes.dir}/client"/>
+ <java fork="true" classname="client.Client" dir="${build.classes.dir}/client">
+ <jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
+ <classpath>
+ <path refid="client-classpath"/>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="debugclient">
+ <echo message="running client: client.Client dir: ${build.classes.dir}/client"/>
+ <java fork="true" classname="client.Client" dir="${build.classes.dir}/client">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9008"/>
+ <jvmarg value="-Djava.util.logging.config.file=logging.properties"/>
+ <classpath>
+ <path refid="client-classpath"/>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/client/Client.java
new file mode 100644
index 0000000..11b9b13
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/client/Client.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import com.sun.xml.ws.transport.tcp.io.DataInOutUtils;
+import com.sun.xml.ws.transport.tcp.util.TCPConstants;
+import com.sun.xml.ws.transport.tcp.util.Version;
+import com.sun.xml.ws.transport.tcp.util.VersionController;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.Socket;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import javax.annotation.Resource;
+
+import servlet_endpoint.ServletHelloService;
+import servlet_endpoint.ServletHello;
+
+import ejb_endpoint.WSHelloEJBService;
+import ejb_endpoint.WSHelloEJB;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ @Resource
+ static javax.transaction.UserTransaction ut;
+
+ public static final int TIME_OUT = 1000 * 60;
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ stat.addDescription("soaptcp-test");
+ String host = "localhost";
+ int port = 8080;
+ if (args.length == 1) { // run with appclient?
+ args = args[0].split(" ");
+ }
+
+ if (args.length >= 2) {
+ host = args[0];
+ port = Integer.parseInt(args[1]);
+ }
+
+ System.out.println("Connecting to host: " + host + " port: " + port);
+ Client client = new Client();
+ if (client.doPortUnificationTest(host, port)) {
+ client.doServletTest();
+ client.doEjbTest();
+ } else {
+ stat.addStatus("SOAP/TCP-Servlet-Endpoint", stat.DID_NOT_RUN);
+ stat.addStatus("SOAP/TCP-EJB-Endpoint", stat.DID_NOT_RUN);
+ }
+
+ stat.printSummary("soaptcp-test");
+ }
+
+ public void doServletTest() {
+ try {
+ ServletHelloService svc = new ServletHelloService();
+ ServletHello port = svc.getServletHelloPort();
+
+ for (int i=0;i<10;i++) {
+ String ret = port.sayServletHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Servlet-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("SOAP/TCP-Servlet-Endpoint", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("SOAP/TCP-Servlet-Endpoint", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("SOAP/TCP-Servlet-Endpoint", stat.FAIL);
+ }
+ }
+
+ public void doEjbTest() {
+ try {
+ WSHelloEJBService svc = new WSHelloEJBService();
+ WSHelloEJB port = svc.getWSHelloEJBPort();
+ ut.getStatus();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayEjbHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-EJB-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("SOAP/TCP-EJB-Endpoint", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("SOAP/TCP-EJB-Endpoint", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("SOAP/TCP-EJB-Endpoint", stat.FAIL);
+ }
+ }
+
+ public boolean doPortUnificationTest(String host, int port) {
+ try {
+ Socket s = new Socket("localhost", 8080);
+ s.setSoTimeout(TIME_OUT);
+ final VersionController versionController = VersionController.getInstance();
+ final Version framingVersion = versionController.getFramingVersion();
+ final Version connectionManagementVersion = versionController.getConnectionManagementVersion();
+
+ final OutputStream outputStream = s.getOutputStream();
+ outputStream.write(TCPConstants.PROTOCOL_SCHEMA.getBytes("US-ASCII"));
+
+ DataInOutUtils.writeInts4(outputStream, framingVersion.getMajor(),
+ framingVersion.getMinor(),
+ connectionManagementVersion.getMajor(),
+ connectionManagementVersion.getMinor());
+ outputStream.flush();
+
+ final InputStream inputStream = s.getInputStream();
+ final int[] versionInfo = new int[4];
+
+ DataInOutUtils.readInts4(inputStream, versionInfo, 4);
+
+ final Version serverFramingVersion = new Version(versionInfo[0], versionInfo[1]);
+ final Version serverConnectionManagementVersion = new Version(versionInfo[2], versionInfo[3]);
+
+ final boolean success = versionController.isVersionSupported(serverFramingVersion, serverConnectionManagementVersion);
+ if (success) {
+ stat.addStatus("SOAP/TCP-PortUnification", stat.PASS);
+ return true;
+ } else {
+ System.out.println("SOAP/TCP version mismatch. Sent{fv: " + framingVersion + "; cmv: " + connectionManagementVersion + "}" +
+ " Received{fv: " + serverFramingVersion + "; cmv: " + serverConnectionManagementVersion + "}");
+ stat.addStatus("SOAP/TCP-PortUnification", stat.FAIL);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ stat.addStatus("SOAP/TCP-PortUnification", stat.FAIL);
+ }
+
+ return false;
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/ejb_endpoint/WSHelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/ejb_endpoint/WSHelloEJB.java
new file mode 100644
index 0000000..d820e3e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/ejb_endpoint/WSHelloEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 ejb_endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class WSHelloEJB {
+
+ public String sayEjbHello(String who) {
+ return "WebSvcTest-EJB-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServiceChannelWSImpl.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServiceChannelWSImpl.wsdl
new file mode 100644
index 0000000..5453ba4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServiceChannelWSImpl.wsdl
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+xmlns="http://schemas.xmlsoap.org/wsdl/"
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+xmlns:tns="http://servicechannel.tcp.transport.ws.xml.sun.com/"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:cmngnt="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp"
+xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+xmlns:wsaws="http://www.w3.org/2005/08/addressing"
+targetNamespace="http://servicechannel.tcp.transport.ws.xml.sun.com/"
+name="ServiceChannelWSImplService">
+
+ <wsp:Policy wsu:Id="AddNumbersPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <cmngnt:ConnectionManagement HighWatermark="1095" MaxParallelConnections="10" NumberToReclaim="7"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+<message name="initiateSession">
+<part name="parameters" element="tns:initiateSession"/>
+</message>
+<message name="initiateSessionResponse">
+<part name="parameters" element="tns:initiateSessionResponse"/>
+</message>
+<message name="ServiceChannelException">
+<part name="fault" element="tns:ServiceChannelException"/>
+</message>
+<message name="openChannel">
+<part name="parameters" element="tns:openChannel"/>
+</message>
+<message name="openChannelResponse">
+<part name="parameters" element="tns:openChannelResponse"/>
+</message>
+<message name="closeChannel">
+<part name="parameters" element="tns:closeChannel"/>
+</message>
+<message name="closeChannelResponse">
+<part name="parameters" element="tns:closeChannelResponse"/>
+</message>
+<portType name="ServiceChannelWSImpl">
+<operation name="initiateSession">
+<input message="tns:initiateSession"/>
+<output message="tns:initiateSessionResponse"/>
+<fault message="tns:ServiceChannelException" name="ServiceChannelException"/>
+</operation>
+<operation name="openChannel">
+<input message="tns:openChannel"/>
+<output message="tns:openChannelResponse"/>
+<fault message="tns:ServiceChannelException" name="ServiceChannelException"/>
+</operation>
+<operation name="closeChannel">
+<input message="tns:closeChannel"/>
+<output message="tns:closeChannelResponse"/>
+<fault message="tns:ServiceChannelException" name="ServiceChannelException"/>
+</operation>
+</portType>
+<binding name="ServiceChannelWSImplPortBinding" type="tns:ServiceChannelWSImpl">
+ <wsp:PolicyReference URI="#AddNumbersPortBindingPolicy"/>
+<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+<operation name="initiateSession">
+<soap:operation soapAction=""/>
+<input>
+<soap:body use="literal"/>
+</input>
+<output>
+<soap:body use="literal"/>
+</output>
+<fault name="ServiceChannelException">
+<soap:fault name="ServiceChannelException" use="literal"/>
+</fault>
+</operation>
+<operation name="openChannel">
+<soap:operation soapAction=""/>
+<input>
+<soap:body use="literal"/>
+</input>
+<output>
+<soap:body use="literal"/>
+</output>
+<fault name="ServiceChannelException">
+<soap:fault name="ServiceChannelException" use="literal"/>
+</fault>
+</operation>
+<operation name="closeChannel">
+<soap:operation soapAction=""/>
+<input>
+<soap:body use="literal"/>
+</input>
+<output>
+<soap:body use="literal"/>
+</output>
+<fault name="ServiceChannelException">
+<soap:fault name="ServiceChannelException" use="literal"/>
+</fault>
+</operation>
+</binding>
+<service name="ServiceChannelWSImplService">
+<port name="ServiceChannelWSImplPort" binding="tns:ServiceChannelWSImplPortBinding">
+<soap:address location="vnd.sun.ws.tcp://CHANGED_BY_RUNTIME"/>
+</port>
+</service>
+
+
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServletHelloService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServletHelloService.wsdl
new file mode 100644
index 0000000..4175d5e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/ServletHelloService.wsdl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://servlet_endpoint/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://servlet_endpoint/" name="ServletHelloService" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/transport/client"><wsp:UsingPolicy></wsp:UsingPolicy><types><xsd:schema><xsd:import namespace="http://servlet_endpoint/" schemaLocation="http://localhost:8080/soaptcp/webservice/ServletHelloService?xsd=1"></xsd:import></xsd:schema></types><message name="sayServletHello"><part name="parameters" element="tns:sayServletHello"></part></message><message name="sayServletHelloResponse"><part name="parameters" element="tns:sayServletHelloResponse"></part></message><portType name="ServletHello"><operation name="sayServletHello"><input message="tns:sayServletHello"></input><output message="tns:sayServletHelloResponse"></output></operation></portType><binding name="ServletHelloPortBinding" type="tns:ServletHello"><wsp:PolicyReference URI="#ServletHelloPortBindingPolicy"/>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding><operation name="sayServletHello"><soap:operation soapAction=""></soap:operation><input><soap:body use="literal"></soap:body></input><output><soap:body use="literal"></soap:body></output></operation></binding><service name="ServletHelloService"><port name="ServletHelloPort" binding="tns:ServletHelloPortBinding"><soap:address location="http://localhost:8080/soaptcp/webservice/ServletHelloService"></soap:address></port></service>
+ <wsp:Policy wsu:Id="ServletHelloPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <tcp:AutomaticallySelectOptimalTransport/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/WSHelloEJB.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/WSHelloEJB.wsdl
new file mode 100644
index 0000000..b20bfac
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/WSHelloEJB.wsdl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ejb_endpoint/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ejb_endpoint/" name="WSHelloEJBService" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:fi="http://java.sun.com/xml/ns/wsit/2006/09/policy/encoding/client" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/transport/client"><wsp:UsingPolicy></wsp:UsingPolicy><types><xsd:schema><xsd:import namespace="http://ejb_endpoint/" schemaLocation="http://localhost:8080/WSHelloEJBService/WSHelloEJB?xsd=1"></xsd:import></xsd:schema></types><message name="sayEjbHello"><part name="parameters" element="tns:sayEjbHello"></part></message><message name="sayEjbHelloResponse"><part name="parameters" element="tns:sayEjbHelloResponse"></part></message><portType name="WSHello"><operation name="sayEjbHello"><input message="tns:sayEjbHello"></input><output message="tns:sayEjbHelloResponse"></output></operation></portType><binding name="WSHelloEJBPortBinding" type="tns:WSHello"><wsp:PolicyReference URI="#WSHelloEJBPortBindingPolicy"/>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding><operation name="sayEjbHello"><soap:operation soapAction=""></soap:operation><input><soap:body use="literal"></soap:body></input><output><soap:body use="literal"></soap:body></output></operation></binding><service name="WSHelloEJBService"><port name="WSHelloEJBPort" binding="tns:WSHelloEJBPortBinding"><soap:address location="http://localhost:8080/WSHelloEJBService/WSHelloEJB"></soap:address></port></service>
+ <wsp:Policy wsu:Id="WSHelloEJBPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <tcp:AutomaticallySelectOptimalTransport/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/logging.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/logging.properties
new file mode 100644
index 0000000..2a1b82f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/logging.properties
@@ -0,0 +1,57 @@
+#
+# Copyright (c) 2017, 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
+#
+
+# Properties file which configures the operation of the JDK
+# logging facility.
+
+# The system will look for this config file, first using
+# a System property specified at startup:
+#
+# >java -Djava.util.logging.config.file=myLoggingConfigFilePath
+#
+# If this property is not specified, then the config file is
+# retrieved from its default location at:
+#
+# JDK_HOME/jre/lib/logging.properties
+
+# Global logging properties.
+# ------------------------------------------
+# The set of handlers to be loaded upon startup.
+# Comma-separated list of class names.
+# (? LogManager docs say no comma here, but JDK example has comma.)
+handlers=java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# Loggers and Handlers may override this level
+.level=SEVERE
+
+# Loggers
+# ------------------------------------------
+# Loggers are usually attached to packages.
+# Here, the level for each package is specified.
+# The global level is used by default, so levels
+# specified here simply act as an override.
+# javax.enterprise.resource.webservices.jaxws.client.tcp.level=ALL
+com.sun.xml.ws.transport.tcp.level=INFO
+#com.sun.xml.ws.transport.tcp.dump.level=FINEST
+
+# Handlers
+# -----------------------------------------
+
+# --- ConsoleHandler ---
+# Override of global logging level
+java.util.logging.ConsoleHandler.level=ALL
+java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/wsit-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/wsit-client.xml
new file mode 100644
index 0000000..34ce41f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/client/wsit-client.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="mainclientconfig"
+ >
+ <import location="ServiceChannelWSImpl.wsdl" namespace="http://servicechannel.tcp.transport.ws.xml.sun.com/"/>
+ <import location="ServletHelloService.wsdl" namespace="http://servlet_endpoint/"/>
+ <import location="WSHelloEJB.wsdl" namespace="http://ejb_endpoint/"/>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/ejb/wsit-ejb_endpoint.WSHelloEJB.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/ejb/wsit-ejb_endpoint.WSHelloEJB.xml
new file mode 100644
index 0000000..641a670
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/ejb/wsit-ejb_endpoint.WSHelloEJB.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="WSHelloEJBService" targetNamespace="http://ejb_endpoint/" xmlns:tns="http://ejb_endpoint/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service"
+ >
+ <portType name="WSHelloEJB"/>
+ <binding name="WSHelloEJBPortBinding" type="tns:WSHelloEJB">
+ <wsp:PolicyReference URI="#WSHelloEJBPortBindingPolicy"/>
+ </binding>
+ <service name="WSHelloEJBService">
+ <wsdl:port name="WSHelloEJBPort" binding="tns:WSHelloEJBPortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="WSHelloEJBPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <tcp:OptimizedTCPTransport enabled="true"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/web/wsit-servlet_endpoint.ServletHello.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/web/wsit-servlet_endpoint.ServletHello.xml
new file mode 100644
index 0000000..4a63f76
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/etc/web/wsit-servlet_endpoint.ServletHello.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="ServletHelloService" targetNamespace="http://servlet_endpoint/" xmlns:tns="http://servlet_endpoint/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service"
+ >
+ <portType name="ServletHello"/>
+ <binding name="ServletHelloPortBinding" type="tns:ServletHello">
+ <wsp:PolicyReference URI="#ServletHelloPortBindingPolicy"/>
+ </binding>
+ <service name="ServletHelloService">
+ <wsdl:port name="ServletHelloPort" binding="tns:ServletHelloPortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="ServletHelloPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <tcp:OptimizedTCPTransport enabled="true"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/servlet_endpoint/ServletHello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/servlet_endpoint/ServletHello.java
new file mode 100644
index 0000000..0bc1988
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/servlet_endpoint/ServletHello.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 servlet_endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public class ServletHello {
+
+ public String sayServletHello(String param) {
+ return "WebSvcTest-Servlet-Hello " + param;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/web.xml
new file mode 100644
index 0000000..f06f74c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/soaptcp/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Servlet Hello Service</description>
+ <display-name>Servlet HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Servlet Hello Web Service</description>
+ <display-name>ServletHelloWebService</display-name>
+ <servlet-name>ServletHello</servlet-name>
+ <servlet-class>servlet_endpoint.ServletHello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletHello</servlet-name>
+ <url-pattern>/webservice/ServletHelloService</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.properties
new file mode 100644
index 0000000..5c1b4ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="svchandler-1"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.xml
new file mode 100644
index 0000000..4a7a61d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/build.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="svchandler-1" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+<path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/svchandler-1/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/svchandler-1"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/svchandler-1/SubtractNumbers.wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpathref="class.path"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client/TestClient.java
new file mode 100644
index 0000000..b893b9a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-svchandler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1113]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("svchandler-1", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("svchandler-1", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..06cf4d8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+System.out.println("I got n1 = " + number1 + " and n2 = " + number2);
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/TestHandler.java
new file mode 100644
index 0000000..2d47d81
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/endpoint/TestHandler.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+import javax.annotation.Resource;
+import javax.annotation.PostConstruct;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "_HANDLER_PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ if ("_HANDLER_PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ }
+ System.out.println("injectedString = " + injectedString);
+ try {
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(++number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/web.xml
new file mode 100644
index 0000000..8f43a6d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/web.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webclient/Client.java
new file mode 100644
index 0000000..9735a0e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webclient/Client.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put
+(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+"http://HTTP_HOST:HTTP_PORT/svchandler-1/webservice/SubtractNumbersService?WSDL");
+
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webservices.xml
new file mode 100644
index 0000000..9b0b931
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-1/webservices.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ <handler-chains>
+ <handler-chain>
+ <handler>
+ <handler-name>TEST_HANDLER</handler-name>
+ <handler-class>endpoint.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+ </handler-chains>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.properties
new file mode 100644
index 0000000..4ddb9df
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="svchandler-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.xml
new file mode 100644
index 0000000..77b2277
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/build.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="svchandler-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+<path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/svchandler-2/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="endpoint/myhandler.xml" todir="${build.classes.dir}/endpoint"/>
+ <antcall target="pkg-war">
+ <param name="handler.name" value="myhandler.xml"/>
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/svchandler-2"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/svchandler-2/SubtractNumbers.wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpathref="class.path"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client/TestClient.java
new file mode 100644
index 0000000..d033c31
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-svchandler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1113]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("svchandler-2", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("svchandler-2", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..4e86556
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.HandlerChain(name="some name", file="myhandler.xml")
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+System.out.println("I got n1 = " + number1 + " and n2 = " + number2);
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/TestHandler.java
new file mode 100644
index 0000000..582e3af
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/TestHandler.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+import javax.annotation.PostConstruct;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ if ("PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ } else {
+ System.out.println("injectedString = " + injectedString);
+ }
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(++number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/myhandler.xml
new file mode 100644
index 0000000..9b79e5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/endpoint/myhandler.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>endpoint.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/web.xml
new file mode 100644
index 0000000..54d20c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/web.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webclient/Client.java
new file mode 100644
index 0000000..dd9d3de
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/svchandler-2/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-2/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.properties
new file mode 100644
index 0000000..e0d0521
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="svchandler-3"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.xml
new file mode 100644
index 0000000..f559505
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/build.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="svchandler-3" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+<path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/svchandler-3/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="endpoint/myhandler.xml" todir="${build.classes.dir}/endpoint"/>
+ <antcall target="pkg-war">
+ <param name="handler.name" value="myhandler.xml"/>
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/svchandler-3"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/svchandler-3/SubtractNumbers.wsdl"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpathref="class.path"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client/TestClient.java
new file mode 100644
index 0000000..56549fa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-svchandler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1111]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("svchandler-3", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("svchandler-3", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..4e86556
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.HandlerChain(name="some name", file="myhandler.xml")
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+System.out.println("I got n1 = " + number1 + " and n2 = " + number2);
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/TestHandler.java
new file mode 100644
index 0000000..9a525ed
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/TestHandler.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/myhandler.xml
new file mode 100644
index 0000000..16ad70f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/endpoint/myhandler.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>endpoint.TestHandler</handler-class>
+ <init-param>
+ <param-name>QUANTITY</param-name>
+ <param-value>10</param-value>
+ </init-param>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webclient/Client.java
new file mode 100644
index 0000000..eca56cf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/svchandler-3/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-3/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.properties
new file mode 100644
index 0000000..b8724bc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="svchandler-4"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.xml
new file mode 100644
index 0000000..4de419f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/build.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="svchandler-4" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+<path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-client, deploy-app, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/SubtractNumbers.wsdl -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/svchandler-4/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="endpoint/myhandler.xml" todir="${build.classes.dir}/endpoint"/>
+ <antcall target="pkg-war">
+ <param name="handler.name" value="myhandler.xml"/>
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/svchandler-4"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-b custom-client.xml -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ${env.APS_HOME}/devtests/webservice/annotations/svchandler-4/SubtractNumbers.wsdl"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+<classpath refid="classpath"/>
+ </javac>
+
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+<!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client/TestClient.java
new file mode 100644
index 0000000..61bc820
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-svchandler-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[1113]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("svchandler-4", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("svchandler-4", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-client.xml
new file mode 100644
index 0000000..839fcb1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-server.xml
new file mode 100644
index 0000000..170d667
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="SubtractNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..4e86556
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.HandlerChain(name="some name", file="myhandler.xml")
+@javax.jws.WebService (serviceName="junkjunkjunk", endpointInterface="endpoint.SubtractNumbersPortType")
+public class SubtractNumbersImpl implements SubtractNumbersPortType {
+
+ public int subtractNumbers (int number1, int number2) {
+System.out.println("I got n1 = " + number1 + " and n2 = " + number2);
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/TestHandler.java
new file mode 100644
index 0000000..582e3af
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/TestHandler.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+import javax.annotation.PostConstruct;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ if ("PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ } else {
+ System.out.println("injectedString = " + injectedString);
+ }
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ int number = Integer.parseInt(paramElement.getValue());
+ paramElement.setValue(String.valueOf(++number));
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/myhandler.xml
new file mode 100644
index 0000000..189b225
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/endpoint/myhandler.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jws:handler-config xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <jws:handler-chains>
+ <jws:handler-chain>
+ <jws:handler>
+ <jws:handler-class>endpoint.TestHandler</jws:handler-class>
+ </jws:handler>
+ </jws:handler-chain>
+ </jws:handler-chains>
+</jws:handler-config>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/web.xml
new file mode 100644
index 0000000..54d20c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/web.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+ </env-entry>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webclient/Client.java
new file mode 100644
index 0000000..c3ff35b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webclient/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ SubtractNumbersPortType port = service.getSubtractNumbersPortType();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/svchandler-4/webservice/SubtractNumbersService?WSDL");
+
+ int ret = port.subtractNumbers(9999, 8888);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webservices.xml
new file mode 100644
index 0000000..b132d4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/svchandler-4/webservices.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.properties
new file mode 100644
index 0000000..8326c83
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="warservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.xml
new file mode 100644
index 0000000..83dd39d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, restart-test, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/HelloService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+
+ <!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="war-with-endpointimpl-only"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/client/Client.java
new file mode 100644
index 0000000..416c0ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/warservice/webservice/HelloService?WSDL")
+ static HelloService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !" + args[0]);
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ if(ret.indexOf(args[0]) == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(args[0], stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/endpoint/Hello.java
new file mode 100644
index 0000000..8c6f018
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/endpoint/Hello.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/web.xml
new file mode 100644
index 0000000..37ce182
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/warservice/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/webservice/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/ReadMe.txt b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/ReadMe.txt
new file mode 100644
index 0000000..b6e504e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/ReadMe.txt
@@ -0,0 +1,2 @@
+This test bundles the Web Service and a component using @WebServiceRef in the same module.
+Testcase for GLASSFISH-12051.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/SubtractNumbers.wsdl
new file mode 100644
index 0000000..48bb785
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/SubtractNumbers.wsdl
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://endpoint/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://endpoint/" name="SubtractNumbersImplService">
+ <types>
+ <xs:schema xmlns:tns="http://endpoint/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://endpoint/">
+
+ <xs:element name="subtractNumbers" type="tns:subtractNumbers"/>
+
+ <xs:element name="subtractNumbersResponse" type="tns:subtractNumbersResponse"/>
+
+ <xs:complexType name="subtractNumbers">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="subtractNumbersResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers"/>
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="parameters" element="tns:subtractNumbersResponse"/>
+ </message>
+ <portType name="SubtractNumbers">
+ <operation name="subtractNumbers">
+ <input wsam:Action="http://endpoint/SubtractNumbersImpl/subtractNumbersRequest"
+ message="tns:subtractNumbers"/>
+ <output wsam:Action="http://endpoint/SubtractNumbersImpl/subtractNumbersResponse"
+ message="tns:subtractNumbersResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbers">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="subtractNumbers">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPort" binding="tns:SubtractNumbersBinding">
+ <soap:address location="http://localhost:8080/webserviceref-lookup/SubtractNumbersImplService"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.properties
new file mode 100644
index 0000000..209d951
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="${ant.project.name}"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.xml
new file mode 100644
index 0000000..eaa3cba
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/build.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="webserviceref-cobundle" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app" />
+
+ <target name="compile" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <echo message="common.xml: Compiling test source files" level="verbose"/>
+
+ <javac srcdir="${basedir}" includes="webclient/**, endpoint/**"
+ destdir="${build.classes.dir}"
+ classpath="${s1astest.classpath}"
+ debug="on"
+ failonerror="true">
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+ </javac>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p service -keep -d ${build.classes.dir} ${basedir}/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <antcall target="pkg-bundle"/>
+ </target>
+
+ <target name="pkg-bundle">
+ <property name="wsdlfile.location" value="${basedir}"/>
+ <property name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <property name="war.classes" value="${build.classes.dir}"/>
+ <property name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/> <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
+ failonerror="false"/>
+ <copy file="${web.xml}"
+ tofile="${build.classes.dir}/tmp/WEB-INF/web.xml" failonerror="false"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
+ <fileset dir="${war.classes}">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+
+ <echo message="Creating war file ${war.file}" level="verbose"/>
+ <jar jarfile="${war.file}" basedir="${build.classes.dir}/tmp" update="true">
+ <!--<fileset dir="${build.classes.dir}/tmp" casesensitive="yes">-->
+ <!--<include name="**/*class*"/>-->
+ <!--</fileset>-->
+ <!--<fileset dir="${build.classes.dir}/tmp/WEB-INF" casesensitive="true">-->
+ <!--</fileset>-->
+ </jar>
+
+ <echo message="created war file ${war.file}" level="verbose"/>
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <echo message="my webclient war classes are:${webclient.war.classes}"
+ level="verbose"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/webserviceref-cobundle/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/client/TestClient.java
new file mode 100644
index 0000000..560f0f2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/client/TestClient.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 1997, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ * @author Rama Pulavarthi
+ */
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices13-lookup");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation-2");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection) u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader(new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if (line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if (line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if (code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if (!found1) {
+ fail();
+ }
+ if (!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-lookup", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-lookup", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..6c3b5db
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1997, 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 endpoint;
+
+import service.SubtractNumbers;
+
+/**
+ * @author Rama Pulavarthi
+ */
+@javax.jws.WebService(targetNamespace = "http://endpoint/", portName = "SubtractNumbersPort",
+ serviceName = "SubtractNumbersService", wsdlLocation = "WEB-INF/wsdl/SubtractNumbers.wsdl",
+ endpointInterface = "service.SubtractNumbers")
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers(int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/web.xml
new file mode 100644
index 0000000..0fb0f1b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>webclient.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/webclient/Client.java
new file mode 100644
index 0000000..16f5266
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-cobundle/webclient/Client.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 1997, 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 webclient;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+import service.*;
+
+/**
+ * @author Rama Pulavarthi
+ */
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef
+ SubtractNumbersService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump = true;
+ SubtractNumbers port2 = service.getSubtractNumbersPort();
+
+ ((BindingProvider) port2).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://localhost:8080/webserviceref-cobundle/SubtractNumbersService?WSDL");
+ int ret = port2.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.properties
new file mode 100644
index 0000000..b469bab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webserviceref-lookup"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.xml
new file mode 100644
index 0000000..e000617
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/build.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webserviceref-lookup" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <!--<antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webserviceref-lookup/SubtractNumbers.wsdl"/>
+ </antcall> -->
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webserviceref-lookup"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/webserviceref-lookup/webservice/SubtractNumbersService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-sun-web.xml
new file mode 100644
index 0000000..8321264
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-sun-web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>foo/bar</service-ref-name>
+ <!--<port-info>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://Echo.org</namespaceURI>
+ <localpart>EchoPort</localpart>
+ </wsdl-port>
+ </port-info>
+ <wsdl-override>http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL</wsdl-override>
+-->
+ </service-ref>
+
+
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client/TestClient.java
new file mode 100644
index 0000000..0def70d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices13-lookup");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation-2");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-lookup", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-lookup", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..77bda18
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/sun-web.xml
new file mode 100644
index 0000000..6aae747
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/sun-web.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webclient/Client.java
new file mode 100644
index 0000000..4827059
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webclient/Client.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(name="foo/bar" )
+ @Addressing
+ SubtractNumbersService service;
+
+ @javax.xml.ws.WebServiceRef(lookup="java:comp/env/foo/bar")
+ SubtractNumbersService service2;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+ SubtractNumbersImpl port2 = service2.getSubtractNumbersPortType();
+
+ int ret = port2.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webservices.xml
new file mode 100644
index 0000000..3d3f5b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webserviceref-lookup/webservices.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>200</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <required>false</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <!--<respect-binding>
+ <enabled>true</enabled>
+ </respect-binding>-->
+
+ <service-endpoint-interface>endpoint.SubtractNumbersImpl</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.properties
new file mode 100644
index 0000000..58c6cb7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservicerefs"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.xml
new file mode 100644
index 0000000..e1c0513
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/build.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservicerefs" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-web, clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-web" depends="assemble-web, deploy-web-app"/>
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="ejb_endpoint"/>
+ </antcall>
+ <antcall target="pkg-ejb-jar">
+ <param name="jar.classes" value="ejb_endpoint"/>
+ <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web">
+ <antcall target="compile-common">
+ <param name="src" value="servlet_endpoint"/>
+ </antcall>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/webservice/ServletHelloService?WSDL"/>
+ </antcall>
+ <echo message="wsimporting http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/WSHelloEJBService/WSHelloEJB?WSDL"/>
+ </antcall>
+
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-web-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-ejb-jar">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="webservicerefs-test"/>
+ </antcall>
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/client/Client.java
new file mode 100644
index 0000000..9c1123e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/client/Client.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRefs;
+import javax.xml.ws.WebServiceRef;
+
+import servlet_endpoint.ServletHelloService;
+import servlet_endpoint.ServletHello;
+
+import ejb_endpoint.WSHelloEJBService;
+import ejb_endpoint.WSHello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+@WebServiceRefs({
+ @WebServiceRef(name="service/MyServletService", type=servlet_endpoint.ServletHelloService.class, wsdlLocation="http://HTTP_HOST:HTTP_PORT/webservicerefs/webservice/ServletHelloService?WSDL"),
+ @WebServiceRef(name="service/MyEjbService", type=ejb_endpoint.WSHelloEJBService.class, wsdlLocation="http://HTTP_HOST:HTTP_PORT/WSHelloEJBService/WSHelloEJB?WSDL") })
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ stat.addDescription("webservicerefs-test");
+ Client client = new Client();
+ client.doServletTest();
+ client.doEjbTest();
+ stat.printSummary("webservicerefs-test");
+ }
+
+ public void doServletTest() {
+ try {
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+ ServletHelloService svc = (ServletHelloService)ic.lookup("java:comp/env/service/MyServletService");
+ ServletHello port = svc.getServletHelloPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayServletHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Servlet-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("WebServiceRefs-Servlet-Endpoint", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("WebServiceRefs-Servlet-Endpoint", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("WebServiceRefs-Servlet-Endpoint", stat.FAIL);
+ }
+ }
+
+ public void doEjbTest() {
+ try {
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+ WSHelloEJBService svc = (WSHelloEJBService)ic.lookup("java:comp/env/service/MyEjbService");
+ WSHello port = svc.getWSHelloEJBPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayEjbHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-EJB-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("WebServiceRefs-EJB-Endpoint", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("WebServiceRefs-EJB-Endpoint", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("WebServiceRefs-EJB-Endpoint", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHello.java
new file mode 100644
index 0000000..6f40c20
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHello.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 ejb_endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public interface WSHello {
+
+ public String sayEjbHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHelloEJB.java
new file mode 100644
index 0000000..4b0bdc5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/ejb_endpoint/WSHelloEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 ejb_endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="ejb_endpoint.WSHello")
+@Stateless
+public class WSHelloEJB implements WSHello {
+
+ public String sayEjbHello(String who) {
+ return "WebSvcTest-EJB-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/servlet_endpoint/ServletHello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/servlet_endpoint/ServletHello.java
new file mode 100644
index 0000000..0bc1988
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/servlet_endpoint/ServletHello.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 servlet_endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public class ServletHello {
+
+ public String sayServletHello(String param) {
+ return "WebSvcTest-Servlet-Hello " + param;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/web.xml
new file mode 100644
index 0000000..f06f74c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservicerefs/web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Servlet Hello Service</description>
+ <display-name>Servlet HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Servlet Hello Web Service</description>
+ <display-name>ServletHelloWebService</display-name>
+ <servlet-name>ServletHello</servlet-name>
+ <servlet-class>servlet_endpoint.ServletHello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletHello</servlet-name>
+ <url-pattern>/webservice/ServletHelloService</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.properties
new file mode 100644
index 0000000..e46a810
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservices13-addressing-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.xml
new file mode 100644
index 0000000..079e3fd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/build.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservices13-addressing-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <!--<antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing/SubtractNumbers.wsdl"/>
+ </antcall> -->
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing-2"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/webservices13-addressing-2/webservice/SubtractNumbersService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-sun-web.xml
new file mode 100644
index 0000000..8321264
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-sun-web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>foo/bar</service-ref-name>
+ <!--<port-info>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.WSAddressingFeaturesTestUsingAnnotations.Echo</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://Echo.org</namespaceURI>
+ <localpart>EchoPort</localpart>
+ </wsdl-port>
+ </port-info>
+ <wsdl-override>http://webServerHost.1:webServerPort.1/WSAddressingFeaturesTestUsingAnnotations_web/jaxws/Echo?WSDL</wsdl-override>
+-->
+ </service-ref>
+
+
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client/TestClient.java
new file mode 100644
index 0000000..2a92e35
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices13-descoverride-annotation-2");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation-2");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-addressing-2", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-addressing-2", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..77bda18
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/sun-web.xml
new file mode 100644
index 0000000..6aae747
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/sun-web.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webclient/Client.java
new file mode 100644
index 0000000..2c9765d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webclient/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(name="foo/bar" ,value =SubtractNumbersService.class)
+ @Addressing (enabled=false)
+ //@Addressing
+ SubtractNumbersImpl port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+
+ int ret = port.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webservices.xml
new file mode 100644
index 0000000..3d3f5b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-2/webservices.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>200</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <required>false</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <!--<respect-binding>
+ <enabled>true</enabled>
+ </respect-binding>-->
+
+ <service-endpoint-interface>endpoint.SubtractNumbersImpl</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/AddNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/AddNumbers.wsdl
new file mode 100644
index 0000000..c51045a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/AddNumbers.wsdl
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="AddNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:wsa="http://www.w3.org/2005/08/addressing"
+xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="addNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbersResponse" type="tns:addNumbersResponse" />
+
+ <complexType name="addNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="addNumbers" type="tns:addNumbers" />
+
+ </xsd:schema>
+ </types>
+ <message name="addNumbers">
+ <part name="parameters" element="tns:addNumbers" />
+ </message>
+ <message name="addNumbersResponse">
+ <part name="result" element="tns:addNumbersResponse" />
+ </message>
+ <portType name="AddNumbersPortType">
+ <operation name="addNumbers">
+ <input message="tns:addNumbers" wsam:Action="addNumbersAction" />
+ <output message="tns:addNumbersResponse" wsam:Action="addNumbersResponseAction" />
+ </operation>
+ </portType>
+ <binding name="AddNumbersBinding" type="tns:AddNumbersPortType">
+ <wsp:Policy>
+ <wsam:Addressing wsp:Optional="true">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+
+ <soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+ <operation name="addNumbers">
+ <soap12:operation soapAction="" />
+ <input>
+ <soap12:body use="literal" />
+ </input>
+ <output>
+ <soap12:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="AddNumbersService">
+ <port name="AddNumbersPort" binding="tns:AddNumbersBinding">
+ <soap12:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/Client.java
new file mode 100644
index 0000000..600f1b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.*;
+
+import javax.xml.ws.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @Addressing
+ @WebServiceRef(name="service/MyService") static AddNumbersService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices13-addressing-appclient test");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices13-addressing-appclientID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+
+ AddNumbersPortType port = service.getAddNumbersPort();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://localhost:8080/webservices13-addressing-appclient/webservice/AddNumbersService?WSDL");
+ int ret = port.addNumbers(100, 200);
+ if(ret != 300) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("webservices13-addressing-appclient", stat.FAIL);
+ return;
+ }
+ stat.addStatus("webservices13-addressing-appclient", stat.PASS);
+ System.out.println("Add result = " + ret);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("webservices13-addressing-appclient", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/MANIFEST.MF
new file mode 100644
index 0000000..0fb13ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/appclient/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: client.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/application-client.xml
new file mode 100644
index 0000000..fb22799
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/application-client.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.properties
new file mode 100644
index 0000000..019c686
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.properties
@@ -0,0 +1,29 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservices13-addressing-appclient"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="application-client.xml" value="application-client.xml"/>
+<property name="sun-application-client.xml" value="sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}/appclient"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.xml
new file mode 100644
index 0000000..3cfcf86
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/build.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservices13-appclient" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, assemble-appclient, deploy-app, deploy-appclient"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/AddNumbers.wsdl -extension -b custom-server.xml -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing-appclient/AddNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <copy file="sun-web.xml.template" tofile="sun-web.xml"/>
+ <replace file="sun-web.xml">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing-appclient"/>
+ <param name="wsdlfile.name" value="AddNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-appclient" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/appclient"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-Xendorsed -b custom-client.xml -extension -keep -d ${build.classes.dir}/appclient ${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing-appclient/AddNumbers.wsdl"/>
+ </antcall>
+<javac srcdir="." destdir="${build.classes.dir}/appclient"
+ includes="appclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+
+ <mkdir dir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <copy file="AddNumbers.wsdl" todir="${build.classes.dir}/appclient/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/appclient"/>
+ <copy file="${application-client.xml}" tofile="${build.classes.dir}/META-INF/application-client.xml" failonerror="false"/>
+ <copy file="sun-application-client.xml.template" tofile="sun-application-client.xml"/>
+ <replace file="${sun-application-client.xml}">
+ <replacefilter token="%TOKEN%" value="file:${env.APS_HOME}/build/localwsdl"/>
+ </replace>
+ <copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml" failonerror="false"/>
+ <jar jarfile="${assemble.dir}/${appname}-client.jar" manifest="./appclient/MANIFEST.MF">
+ <fileset dir="${build.classes.dir}/appclient">
+ <include name="**"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-appclient">
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/client-sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/client-sun-web.xml.template
new file mode 100644
index 0000000..f4b4095
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/client-sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-client.xml
new file mode 100644
index 0000000..6a135ad
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-client.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="client"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-server.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-server.xml
new file mode 100644
index 0000000..4cfbb59
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/custom-server.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2005, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="AddNumbers.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="endpoint"/>
+ </bindings>
+ <bindings node="ns1:definitions/ns1:types/xsd:schema[@targetNamespace='http://duke.org']" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <jaxb:schemaBindings>
+ <jaxb:package name="endpoint"/>
+ </jaxb:schemaBindings>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..6fa9f29
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/endpoint/AddNumbersImpl.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.xml.ws.BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
+@javax.jws.WebService (wsdlLocation="WEB-INF/wsdl/AddNumbers.wsdl", serviceName="AddNumbersService", targetNamespace="http://duke.org", portName="AddNumbersPort", endpointInterface="endpoint.AddNumbersPortType")
+public class AddNumbersImpl implements AddNumbersPortType {
+
+ public int addNumbers (int number1, int number2) {
+ return number1 + number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml
new file mode 100644
index 0000000..65c6c8f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 5//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_5-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>file:/Users/bhakti/devtests/appserv-tests/build/localwsdl/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml.template
new file mode 100644
index 0000000..029d0d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-application-client.xml.template
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 5//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_5-0.dtd">
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/MyService</service-ref-name>
+ <wsdl-override>%TOKEN%/AddNumbers.wsdl</wsdl-override>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml
new file mode 100644
index 0000000..6ef0596
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <wsdl-publish-location>file:/Users/bhakti/devtests/appserv-tests/build/localwsdl</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml.template b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml.template
new file mode 100644
index 0000000..03a42d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/sun-web.xml.template
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <wsdl-publish-location>%TOKEN%</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/web.xml
new file mode 100644
index 0000000..6256153
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing-appclient/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>AddNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for AddNumbers Web Service</description>
+ <display-name>AddNumbersWebService</display-name>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <servlet-class>endpoint.AddNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <url-pattern>/webservice/AddNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.properties
new file mode 100644
index 0000000..80bb1c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservices13-addressing"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.xml
new file mode 100644
index 0000000..07cb2d1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/build.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservices13-addressing" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <!--<antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing/SubtractNumbers.wsdl"/>
+ </antcall> -->
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/webservices13-addressing/webservice/SubtractNumbersService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client/TestClient.java
new file mode 100644
index 0000000..2d1571d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices13-descoverride-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-addressing", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-addressing", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..77bda18
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webclient/Client.java
new file mode 100644
index 0000000..b88f36e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webclient/Client.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(SubtractNumbersService.class)
+ //@Addressing (required = true,enabled=true ,responses=AddressingFeature.Responses.NON_ANONYMOUS)
+ //@Addressing
+ SubtractNumbersImpl port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+ int ret = port.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webservices.xml
new file mode 100644
index 0000000..18337df
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-addressing/webservices.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>200</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <required>true</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <!--<respect-binding>
+ <enabled>true</enabled>
+ </respect-binding>-->
+
+ <service-endpoint-interface>endpoint.SubtractNumbersImpl</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/SubtractNumbers.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/SubtractNumbers.wsdl
new file mode 100644
index 0000000..d069b79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/SubtractNumbers.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SubtractNumbers" targetNamespace="http://duke.org" xmlns:tns="http://duke.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://duke.org">
+
+ <complexType name="subtractNumbersResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbersResponse" type="tns:subtractNumbersResponse" />
+
+ <complexType name="subtractNumbers">
+ <sequence>
+ <element name="arg0" type="xsd:int" />
+ <element name="arg1" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="subtractNumbers" type="tns:subtractNumbers" />
+ </xsd:schema>
+ </types>
+ <message name="subtractNumbers">
+ <part name="parameters" element="tns:subtractNumbers" />
+ </message>
+ <message name="subtractNumbersResponse">
+ <part name="result" element="tns:subtractNumbersResponse" />
+ </message>
+ <portType name="SubtractNumbersPortType">
+ <operation name="subtractNumbers">
+ <input message="tns:subtractNumbers" name="subtract"/>
+ <output message="tns:subtractNumbersResponse" name="subtractResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractNumbersBinding" type="tns:SubtractNumbersPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <operation name="subtractNumbers">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractNumbersService">
+ <port name="SubtractNumbersPortType" binding="tns:SubtractNumbersBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" />
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.properties
new file mode 100644
index 0000000..05ee829
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservices13-clientdds"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.xml
new file mode 100644
index 0000000..6659198
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/build.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservices13-clientdds" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-clientdds/SubtractNumbers.wsdl"/>
+ </antcall>
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-clientdds"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/webservices13-clientdds/webservice/SubtractNumbersService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <copy file="SubtractNumbers.wsdl" tofile="${build.classes.dir}/webclient/WEB-INF/wsdl/SubtractNumbers.wsdl"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-sun-web.xml
new file mode 100644
index 0000000..5914a3d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-sun-web.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-web.xml
new file mode 100644
index 0000000..8ccd3e3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client-web.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <service-ref>
+ <service-ref-name>java:comp/env/service/dds</service-ref-name>
+ <service-interface>client.SubtractNumbersService</service-interface>
+ <service-ref-type>client.SubtractNumbersPortType</service-ref-type>
+ <wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <service-qname xmlns:servicens="http://duke.org">servicens:SubtractNumbersService</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>client.SubtractNumbersPortType</service-endpoint-interface>
+ <addressing>
+ <enabled>true</enabled>
+ <required>true</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ </port-component-ref>
+
+</service-ref>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client/TestClient.java
new file mode 100644
index 0000000..fbd3af2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices13-descoverride-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-clientdds", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-clientdds", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..a3aac5a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService ;
+
+@WebService(
+ portName="SubtractNumbersPortType",
+ serviceName="SubtractNumbersService",
+ targetNamespace="http://duke.org",
+ wsdlLocation="WEB-INF/wsdl/SubtractNumbers.wsdl",
+ endpointInterface="endpoint.SubtractNumbersPortType")
+
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webclient/Client.java
new file mode 100644
index 0000000..ad3a10f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webclient/Client.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ //@javax.xml.ws.WebServiceRef(SubtractNumbersService.class)
+ //@Addressing (required = true,enabled=true ,responses=AddressingFeature.Responses.NON_ANONYMOUS)
+ //@Addressing
+ SubtractNumbersPortType port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+ javax.naming.InitialContext ic = new javax.naming.InitialContext();
+
+ port = (SubtractNumbersPortType)ic.lookup("java:comp/env/service/dds");
+System.out.println("port" + port);
+
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://localhost:8080/webservices13-clientdds/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webservices.xml
new file mode 100644
index 0000000..1bef5f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-clientdds/webservices.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+<wsdl-file>WEB-INF/wsdl/SubtractNumbers.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <!--<wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>-->
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>200</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <required>false</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <!--<respect-binding>
+ <enabled>true</enabled>
+ </respect-binding>-->
+
+
+ <service-endpoint-interface>endpoint.SubtractNumbersImpl</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+
+<!-- <service-endpoint-interface>endpoint.SubtractNumbersPortType</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersImpl</servlet-link>
+ </service-impl-bean>-->
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.properties
new file mode 100644
index 0000000..9f0eb51
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="webservices13-respectbinding"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.xml
new file mode 100644
index 0000000..1c5911e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/build.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="webservices13-respectbinding" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common">
+ <mkdir dir="${build.classes.dir}"/>
+ <!--<antcall target="wsimport">
+ <param name="wsimport.args"
+ value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-respectbinding/SubtractNumbers.wsdl"/>
+ </antcall> -->
+ <antcall target="compile"/>
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-respectbinding"/>
+ <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/webservices13-respectbinding/webservice/SubtractNumbersService?wsdl"/>
+ </antcall>
+
+<replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+<!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client/TestClient.java
new file mode 100644
index 0000000..987551d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices13-descoverride-annotation");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("webservices13-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF SUBTRACT SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[5555]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WEBSERVICES13-respectbinding", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WEBSERVICES13-respectbinding", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/endpoint/SubtractNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/endpoint/SubtractNumbersImpl.java
new file mode 100644
index 0000000..77bda18
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/endpoint/SubtractNumbersImpl.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+@javax.jws.WebService
+public class SubtractNumbersImpl {
+
+ public int subtractNumbers (int number1, int number2) {
+ return number1 - number2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/web.xml
new file mode 100644
index 0000000..4342434
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>SubtractNumbers Service</description>
+
+ <servlet>
+ <description>Endpoint for SubtractNumbers Web Service</description>
+ <display-name>SubtractNumbersWebService</display-name>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <servlet-class>endpoint.SubtractNumbersImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SubtractNumbersService</servlet-name>
+ <url-pattern>/webservice/SubtractNumbersService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webclient/Client.java
new file mode 100644
index 0000000..5d9a8b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webclient/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(SubtractNumbersService.class)
+ //@Addressing (required = true,enabled=true ,responses=AddressingFeature.Responses.NON_ANONYMOUS)
+ //@Addressing
+ SubtractNumbersImpl port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,"http://HTTP_HOST:HTTP_PORT/webservices13-respectbinding/webservice/SubtractNumbersService?WSDL");
+ int ret = port.subtractNumbers(9999, 4444);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF SUBTRACT SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webservices.xml
new file mode 100644
index 0000000..ba8d1c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/webservices13-respectbinding/webservices.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.3"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd">
+ <webservice-description>
+ <display-name>SubtractNumbersService</display-name>
+ <webservice-description-name>SubtractNumbersService</webservice-description-name>
+ <port-component>
+ <port-component-name>SubtractNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://duke.org">wsdl-port_ns__:SubtractNumbersPortType</wsdl-port>
+ <enable-mtom>true</enable-mtom>
+ <mtom-threshold>200</mtom-threshold>
+ <addressing>
+ <enabled>true</enabled>
+ <required>true</required>
+ <responses>ANONYMOUS</responses>
+ </addressing>
+ <respect-binding>
+ <enabled>true</enabled>
+ </respect-binding>
+
+ <service-endpoint-interface>endpoint.SubtractNumbersImpl</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>SubtractNumbersService</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.properties
new file mode 100644
index 0000000..cef48f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.properties
@@ -0,0 +1,26 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="wsctx"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.xml
new file mode 100644
index 0000000..8723960
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/build.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+
+
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <property name="src-name" value="endpoint/Hello.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="clean, setup, runtest1,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/wsctx/HelloService?wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client,deploy-client"/>
+
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client/TestClient.java
new file mode 100644
index 0000000..557110f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("wsctx");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("wsctx-annotation");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello AllHelloWAR]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("wsctx", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("wsctx", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/endpoint/Hello.java
new file mode 100644
index 0000000..0d7eabc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/endpoint/Hello.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+import javax.servlet.ServletContext;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+
+@WebService
+public class Hello {
+
+ @Resource WebServiceContext wsc;
+
+ public String sayHello(String param) {
+ System.out.println("wsctxt-servlet wsc = " + wsc);
+ if(wsc != null) {
+ ServletContext sc =
+(ServletContext)wsc.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
+ String a = null;
+ if (sc!= null ) {
+ a = sc.getServletContextName();
+ }
+ return "Hello " + param +a;
+ }
+ return "WebService Context injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/web.xml
new file mode 100644
index 0000000..f51ccc0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Hello Service</description>
+ <display-name>HelloWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Hello Web Service</description>
+ <display-name>HelloWebService</display-name>
+ <servlet-name>Hello</servlet-name>
+ <servlet-class>endpoint.Hello</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Hello</servlet-name>
+ <url-pattern>/HelloService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/webclient/Client.java
new file mode 100644
index 0000000..a10c6a2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsctxt/webclient/Client.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ Hello port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret = port.sayHello("All");
+ System.out.println(ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/HttpTestService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/HttpTestService.wsdl
new file mode 100644
index 0000000..9a5f405
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/HttpTestService.wsdl
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="HttpTestService"
+ targetNamespace="http://httptestservice.org/wsdl"
+ xmlns:tns="http://httptestservice.org/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:ns="http://httptestservice.org/types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <schema targetNamespace="http://httptestservice.org/types"
+ xmlns:tns="http://httptestservice.org/types"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="HelloRequest">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="HelloResponse">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="HelloOneWay">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+ <message name="Hello_helloRequest">
+ <part name="parameters" type="ns:HelloRequest"/>
+ </message>
+ <message name="Hello_helloResponse">
+ <part name="result" type="ns:HelloResponse"/>
+ </message>
+ <message name="Hello_helloOneWay">
+ <part name="parameters" type="ns:HelloOneWay"/>
+ </message>
+ <portType name="Hello">
+ <operation name="hello">
+ <input message="tns:Hello_helloRequest"/>
+ <output message="tns:Hello_helloResponse"/>
+ </operation>
+ <operation name="helloOneWay">
+ <input message="tns:Hello_helloOneWay"/>
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </output>
+ </operation>
+ <operation name="helloOneWay">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ </operation>
+ </binding>
+ <service name="HttpTestService">
+ <port name="HelloPort" binding="tns:HelloBinding">
+ <soap:address location="http://HTTP_HOST:HTTP_PORT/wsdltojava/ws4ee"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.properties b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.properties
new file mode 100644
index 0000000..55de93a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="wsdltojava"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.xml
new file mode 100644
index 0000000..e5499f5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/build.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="wsdltojava" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="service"/>
+ </antcall>
+ </target>
+
+ <target name="run-wsimport">
+ <mkdir dir="${build.classes.dir}"/>
+ <replace file="HttpTestService.wsdl" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="HttpTestService.wsdl" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/HttpTestService.wsdl -keep -b customservice.xml -d ${build.classes.dir} HttpTestService.wsdl"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, run-wsimport, compile">
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="."/>
+ <param name="wsdlfile.name" value="HttpTestService.wsdl"/>
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting localWSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -wsdllocation ${env.APS_HOME}/devtests/webservice/annotations/wsdltojava/HttpTestService.wsdl -b customclient.xml -d ${build.classes.dir}/client HttpTestService.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runtest">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="basic-wsdl-to-java-test-case"/>
+ </antcall>
+
+ <!--restore the tokens back in file-->
+ <replace file="HttpTestService.wsdl" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="HttpTestService.wsdl" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/client/Client.java
new file mode 100644
index 0000000..391484e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/client/Client.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef static HttpTestService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ HelloRequest req = new HelloRequest();
+ req.setString("From Vijay ");
+ HelloResponse resp = port.hello(req);
+ if(resp.getString().indexOf("From Vijay") == -1) {
+ System.out.println("Unexpected greeting " + resp.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ System.out.println(resp.getString());
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customclient.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customclient.xml
new file mode 100644
index 0000000..7c3372f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customclient.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="client"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customservice.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customservice.xml
new file mode 100644
index 0000000..242611b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/customservice.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="service"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="service"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/service/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/service/HelloImpl.java
new file mode 100644
index 0000000..6946d87
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/service/HelloImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2003, 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
+ */
+
+/*
+ * %W% %E%
+ */
+
+package service;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+import javax.jws.WebService;
+
+@javax.jws.WebService(
+ serviceName="HttpTestService",
+ endpointInterface="service.Hello",
+ portName="HelloPort",
+ targetNamespace="http://httptestservice.org/wsdl",
+ wsdlLocation="WEB-INF/wsdl/HttpTestService.wsdl"
+)
+public class HelloImpl implements Hello {
+
+ public HelloResponse hello(HelloRequest req) {
+ System.out.println("Hello, " + req.getString() + "!");
+ HelloResponse resp = new HelloResponse();
+ resp.setString("Hello, " + req.getString() + "!");
+ return resp;
+ }
+
+ public void helloOneWay(HelloOneWay req) {
+ System.out.println("Hello OneWay, " + req.getString() + "!");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/web.xml b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/web.xml
new file mode 100644
index 0000000..640433a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/annotations/wsdltojava/web.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>WSW2JRLHttpTestApp</display-name>
+ <servlet>
+ <servlet-name>HelloImpl</servlet-name>
+ <servlet-class>service.HelloImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloImpl</servlet-name>
+ <url-pattern>/ws4ee</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/build.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/build.xml
new file mode 100644
index 0000000..2529bc1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/build.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./../report.xml">
+]>
+
+<project name="anonymous" default="usage" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <antcall target="doclit"/>
+ </target>
+
+ <target name="doclit">
+ <record name="doclit.output" action="start" />
+ <ant dir="doclit" target="all"/>
+ <record name="doclit.output" action="stop" />
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant doclit
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/README b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/README
new file mode 100644
index 0000000..96c8be4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/README
@@ -0,0 +1,3 @@
+
+1) file a bug wrt not handlinng array types (if there are more than one
+ anonymous types within an element)
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/anonymous.wsdl b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/anonymous.wsdl
new file mode 100755
index 0000000..378ad51
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/anonymous.wsdl
@@ -0,0 +1,323 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="HelloTest"
+ targetNamespace="urn:test"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ttns="urn:test:types"
+ xmlns:tns="urn:test">
+
+ <types>
+ <xsd:schema targetNamespace="urn:test:types">
+
+ <xsd:element name="Test1Response" type="ttns:Test1ResponseType"/>
+ <xsd:complexType name="Test1ResponseType">
+ <xsd:sequence>
+ <xsd:element name="c" type="xsd:int"/>
+ <xsd:element name="d" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Case 1A -->
+ <xsd:element name="Root1A" type="ttns:Root1AType"/>
+ <xsd:complexType name="Root1AType">
+ <xsd:sequence>
+ <xsd:element name="data1a" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Case 1A Simple-->
+ <xsd:element name="Root1ASimple" type="ttns:Root1ATypeSimple"/>
+ <xsd:simpleType name="Root1ATypeSimple">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="oneASimple1" />
+ <xsd:enumeration value="oneASimple2" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- Case 1B -->
+ <xsd:element name="Root1B">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data1b" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Case 2A -->
+ <xsd:element name="Root2A" type="xsd:string"/>
+
+ <!-- Case 2B -->
+ <xsd:element name="Root2B" type="ttns:Root2BType"/>
+ <xsd:complexType name="Root2BType">
+ <xsd:sequence>
+ <xsd:element name="Inside2B">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data2b" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Case 1B and Case 2B -->
+ <xsd:element name="Root1B2B">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Inside1B2B">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data1b2b" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Case 3A -->
+ <xsd:element name="Root3A">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Inside3A1" minOccurs="1" maxOccurs="2">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data3a1" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Inside3A2" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data3a2" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Case 1B Simple -->
+ <xsd:element name="Root1BSimple">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="String1" />
+ <xsd:enumeration value="String2" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+
+ </xsd:schema>
+ </types>
+
+ <message name="TestRequest1A">
+ <part name="oneA" element="ttns:Root1A"/>
+ </message>
+
+ <message name="TestRequest1ASimple">
+ <part name="oneA" element="ttns:Root1ASimple"/>
+ </message>
+
+ <message name="TestRequest1B">
+ <part name="oneB" element="ttns:Root1B"/>
+ </message>
+
+ <message name="TestRequest1BSimple">
+ <part name="oneB" element="ttns:Root1BSimple"/>
+ </message>
+
+ <message name="TestRequest2A">
+ <part name="twoA" element="ttns:Root2A"/>
+ </message>
+
+ <message name="TestRequest2B">
+ <part name="twoB" element="ttns:Root2B"/>
+ </message>
+
+ <message name="TestRequest1B2B">
+ <part name="oneBtwoB" element="ttns:Root1B2B"/>
+ </message>
+
+ <message name="TestRequest3A">
+ <part name="threeA" element="ttns:Root3A"/>
+ </message>
+
+ <message name="Test1Response">
+ <part name="result" element="ttns:Test1Response"/>
+ </message>
+
+ <portType name="Test1A">
+ <operation name="test1">
+ <input message="tns:TestRequest1A"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test1ASimple">
+ <operation name="test1">
+ <input message="tns:TestRequest1ASimple"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test1B">
+ <operation name="test1">
+ <input message="tns:TestRequest1B"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test1BSimple">
+ <operation name="test1">
+ <input message="tns:TestRequest1BSimple"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test2A">
+ <operation name="test1">
+ <input message="tns:TestRequest2A"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test2B">
+ <operation name="test1">
+ <input message="tns:TestRequest2B"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test1B2B">
+ <operation name="test1">
+ <input message="tns:TestRequest1B2B"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test3A">
+ <operation name="test1">
+ <input message="tns:TestRequest3A"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <binding name="TestBinding1A" type="tns:Test1A">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding1ASimple" type="tns:Test1ASimple">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding1B" type="tns:Test1B">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding1BSimple" type="tns:Test1BSimple">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding2A" type="tns:Test2A">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding2B" type="tns:Test2B">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding1B2B" type="tns:Test1B2B">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding3A" type="tns:Test3A">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <service name="TestService">
+ <port name="TestPort1A" binding="tns:TestBinding1A">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort1ASimple" binding="tns:TestBinding1ASimple">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort1B" binding="tns:TestBinding1B">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort1BSimple" binding="tns:TestBinding1BSimple">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort2A" binding="tns:TestBinding2A">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort2B" binding="tns:TestBinding2B">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort1B2B" binding="tns:TestBinding1B2B">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort3A" binding="tns:TestBinding3A">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.properties b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.properties
new file mode 100644
index 0000000..31029ff
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="doclit"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.xml
new file mode 100644
index 0000000..648ec53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/build.xml
@@ -0,0 +1,90 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="doclit with anonymous types" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="wsi"/>
+ <antcall target="non-wsi"/>
+ </target>
+
+ <!-- this will wrap the element -->
+ <target name="wsi" depends="init-common, clean">
+ <antcall target="gen-portable">
+ <param name="features" value="-f:wsi -Xprintstacktrace"/>
+ </antcall>
+ <antcall target="gen-non-portable"/>
+ </target>
+
+ <!-- this will unwrap the element -->
+ <target name="non-wsi" depends="init-common, clean">
+ <antcall target="gen-portable">
+ <param name="features" value="-Xprintstacktrace"/>
+ </antcall>
+ <antcall target="gen-non-portable"/>
+ </target>
+
+ <target name="gen-portable" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -cp . -mapping mapping.xml ${features} config.xml"/>
+ </antcall>
+ </target>
+
+ <!-- this is to mimic what the server would do at runtime -->
+ <!-- NO feature flags as mapping file should contain enough info -->
+ <target name="gen-non-portable" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen:both -cp . -f:wsi mapping.config.xml"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="anonymous"/>
+ <delete file="mapping.xml"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/config.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/config.xml
new file mode 100755
index 0000000..b763794
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2003, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl name="AnonymousTest"
+ location="file:anonymous.wsdl"
+ packageName="anonymous"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/mapping.config.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/mapping.config.xml
new file mode 100644
index 0000000..81421e6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/doclit/mapping.config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="mapping.xml"
+ wsdlLocation="anonymous.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/anonymous.wsdl b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/anonymous.wsdl
new file mode 100755
index 0000000..183e0ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/anonymous.wsdl
@@ -0,0 +1,187 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="HelloTest"
+ targetNamespace="urn:test"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ttns="urn:test:types"
+ xmlns:tns="urn:test">
+
+ <types>
+ <xsd:schema targetNamespace="urn:test:types">
+
+ <xsd:complexType name="Test1ResponseType">
+ <xsd:sequence>
+ <xsd:element name="c" type="xsd:int"/>
+ <xsd:element name="d" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Case 1A -->
+ <xsd:complexType name="Root1AType">
+ <xsd:sequence>
+ <xsd:element name="data1a" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- Case 1A Simple-->
+ <xsd:simpleType name="Root1ATypeSimple">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="oneASimple1" />
+ <xsd:enumeration value="oneASimple2" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- Case 2B -->
+ <xsd:complexType name="Root2BType">
+ <xsd:sequence>
+ <xsd:element name="Inside2B">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data2b" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Root3AType">
+ <xsd:sequence>
+ <xsd:element name="Inside3A1" minOccurs="1" maxOccurs="2">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data3a1" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Inside3A2" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="data3a2" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <message name="TestRequest1A">
+ <part name="oneA" type="ttns:Root1AType"/>
+ </message>
+
+ <message name="TestRequest1ASimple">
+ <part name="oneA" type="ttns:Root1ATypeSimple"/>
+ </message>
+
+ <message name="TestRequest2B">
+ <part name="twoB" type="ttns:Root2BType"/>
+ </message>
+
+ <message name="TestRequest3A">
+ <part name="threeA" type="ttns:Root3AType"/>
+ </message>
+
+ <message name="Test1Response">
+ <part name="result" type="ttns:Test1ResponseType"/>
+ </message>
+
+ <portType name="Test1A">
+ <operation name="test1">
+ <input message="tns:TestRequest1A"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test1ASimple">
+ <operation name="test1">
+ <input message="tns:TestRequest1ASimple"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test2B">
+ <operation name="test1">
+ <input message="tns:TestRequest2B"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <portType name="Test3A">
+ <operation name="test1">
+ <input message="tns:TestRequest3A"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <binding name="TestBinding1A" type="tns:Test1A">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal" namespace="urn:test:types"/> </input>
+ <output> <soap:body use="literal" namespace="urn:test:types"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding1ASimple" type="tns:Test1ASimple">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal" namespace="urn:test:types"/> </input>
+ <output> <soap:body use="literal" namespace="urn:test:types"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding2B" type="tns:Test2B">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal" namespace="urn:test:types"/> </input>
+ <output> <soap:body use="literal" namespace="urn:test:types"/> </output>
+ </operation>
+ </binding>
+
+ <binding name="TestBinding3A" type="tns:Test3A">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input> <soap:body use="literal" namespace="urn:test:types"/> </input>
+ <output> <soap:body use="literal" namespace="urn:test:types"/> </output>
+ </operation>
+ </binding>
+
+ <service name="TestService">
+ <port name="TestPort1A" binding="tns:TestBinding1A">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort1ASimple" binding="tns:TestBinding1ASimple">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort2B" binding="tns:TestBinding2B">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ <port name="TestPort3A" binding="tns:TestBinding3A">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.properties b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.properties
new file mode 100644
index 0000000..b375f50
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpclit"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.xml
new file mode 100644
index 0000000..c74260a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/build.xml
@@ -0,0 +1,90 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="rpclit with anonymous types" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="wsi"/>
+ <antcall target="non-wsi"/>
+ </target>
+
+ <!-- this will wrap the element -->
+ <target name="wsi" depends="init-common, clean">
+ <antcall target="gen-portable">
+ <param name="features" value="-f:wsi -Xprintstacktrace"/>
+ </antcall>
+ <antcall target="gen-non-portable"/>
+ </target>
+
+ <!-- this will unwrap the element -->
+ <target name="non-wsi" depends="init-common, clean">
+ <antcall target="gen-portable">
+ <param name="features" value="-Xprintstacktrace"/>
+ </antcall>
+ <antcall target="gen-non-portable"/>
+ </target>
+
+ <target name="gen-portable" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -cp . -mapping mapping.xml ${features} config.xml"/>
+ </antcall>
+ </target>
+
+ <!-- this is to mimic what the server would do at runtime -->
+ <!-- NO feature flags as mapping file should contain enough info -->
+ <target name="gen-non-portable" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen:both -cp . -f:wsi mapping.config.xml"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="anonymous"/>
+ <delete file="mapping.xml"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/config.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/config.xml
new file mode 100755
index 0000000..b763794
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2003, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl name="AnonymousTest"
+ location="file:anonymous.wsdl"
+ packageName="anonymous"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/mapping.config.xml b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/mapping.config.xml
new file mode 100644
index 0000000..81421e6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/anonymous/rpclit/mapping.config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="mapping.xml"
+ wsdlLocation="anonymous.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/build.xml b/appserver/tests/appserv-tests/devtests/webservice/build.xml
new file mode 100644
index 0000000..c60dc4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/build.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./report.xml">
+]>
+
+<project name="webservice" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="all">
+ <delete file="${env.APS_HOME}/test_results.html"/>
+ <delete file="${env.APS_HOME}/test_resultsValid.xml"/>
+ <delete file="${env.APS_HOME}/test_results.xml"/>
+ <delete dir="${env.APS_HOME}/build/module"/>
+ <record name="webservice.output" action="start" />
+ <delete dir="${env.APS_HOME}/build/module"/>
+ <ant dir="jaxrpc-hello-ejb" target="all"/>
+ <delete dir="${env.APS_HOME}/build/module"/>
+ <ant dir="jaxrpc-hello-web" target="all"/>
+<!-- <ant dir="googleserver" target="all"/>--> <!-- 3 tests -->
+ <ant dir="xsdany" target="all"/> <!-- 1 test -->
+ <ant dir="filter_urlhandling" target="all"/> <!-- 1 test -->
+ <!-- <ant dir="security" target="all"/>--> <!-- 9 test -->
+<!-- <ant dir="simplefault" target="all"/>
+ <ant dir="handler" target="all"/>
+ <ant dir="webstub_properties" target="all"/>
+ <ant dir="servlethandler" target="all"/>-->
+ <ant dir="annotations" target="all"/>
+ <ant dir="ejb_annotations" target="all"/>
+ <ant dir="mapping/j2w/signature" target="all"/> <!-- 2 tests -->
+ <ant dir="google" target="all"/> <!-- 1 test -->
+ <ant dir="gf_dd/endpoint_address_uri" target="all"/> <!-- 1 test -->
+ <record name="webservice.output" action="stop" />
+ <antcall target="report"/>
+ <antcall target="dev-report"/>
+ </target>
+
+ <target name="google">
+ <record name="google.output" action="start" />
+ <ant dir="google" target="all"/>
+ <record name="google.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="xsdany">
+ <record name="xsdany.output" action="start" />
+ <ant dir="xsdany" target="all"/>
+ <record name="xsdany.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="soapfaults">
+ <record name="soapfaults.output" action="start" />
+ <ant dir="soapfaults" target="all"/>
+ <record name="soapfaults.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="signature">
+ <record name="signature.output" action="start" />
+ <ant dir="mapping/j2w/signature" target="all"/>
+ <record name="signature.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="${basedir}"
+ includes="**.output, count.txt"/>
+ </delete>
+ <ant dir="google" target="clean"/>
+ <ant dir="xsdany" target="clean"/>
+ <ant dir="mapping/j2w/signature" target="clean"/>
+ <ant dir="webstub_properties" target="clean"/>
+ <ant dir="filter_urlhandling" target="clean"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes all the webservice tests)
+
+ ant google (Executes the google tests)
+ ant xsdany (Executes the xsdany tests)
+ </echo>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/common/targets.xml b/appserver/tests/appserv-tests/devtests/webservice/common/targets.xml
new file mode 100644
index 0000000..e7f211e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/common/targets.xml
@@ -0,0 +1,338 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+ <path id="run.classpath">
+ <fileset dir="${dist}">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+
+
+ <target name="build-static" depends="clean,generate-stubs,compile-client,package-client"
+ description="Executes the targets needed to build a static stub client.">
+ </target>
+
+ <target name="prepare-dist"
+ description="Creates the dist directory" >
+ <echo message="Creating the required directories...." />
+ <mkdir dir="${dist}" />
+ </target>
+
+ <target name="generate-stubs"
+ description="Runs wscompile to generate the client stub classes">
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir} -classpath ${build.classes.dir} ${config.wsdl.file}"/>
+ </antcall>
+ </target>
+
+
+ <target name="compile-client" depends="prepare"
+ description="Compiles the client-side source code" >
+ <echo message="Compiling the client source code...."/>
+ <javac srcdir="${client.src}" destdir="${build}">
+ <include name="**/*.java" />
+ <classpath refid="jaxrpc.classpath"/>
+ <classpath path="${build}" />
+ </javac>
+ </target>
+
+ <target name="package-client" depends="prepare-dist"
+ description="Builds the JAR file that contains the client">
+ <echo message="Building the client JAR file...."/>
+ <delete file="${dist}/${client.jar}" />
+ <jar jarfile="${dist}/${client.jar}" >
+ <fileset dir="${build}" />
+ </jar>
+ </target>
+
+
+
+
+
+
+ <target name="clean" >
+ <delete dir="${build}" />
+ <delete dir="${env.APS_HOME}/build" />
+ <delete dir="${dist}" />
+ <delete dir="${assemble}" />
+ <delete dir="${assemble.dir}" />
+ <delete file="${ear.name}" />
+ <delete file="${war.name}" />
+ <delete file="${war.file}" />
+ <delete file="${client.jar.name}" />
+ </target>
+
+ <target name="generate-wsdl"
+ description="Runs wscompile to generate the WSDL file and mapping file">
+ <antcall target="run-wscompile">
+ <param name="param1" value="-define -mapping ${build}/${mapping.file} -keep -d ${build} -nd ${build} -classpath ${build} ${config.interface.file}"/>
+ </antcall>
+ </target>
+
+ <target name="run-wscompile" depends="prepare,set-wscompile"
+ description="Runs wscompile">
+ <echo message="Running wscompile:"/>
+ <echo message=" ${wscompile} ${param1}"/>
+ <exec executable="${wscompile}">
+ <arg line="${param1}"/>
+ </exec>
+ </target>
+
+ <target name="set-wscompile" >
+ <condition property="wscompile" value="${env.S1AS_HOME}/bin/wscompile.bat">
+ <os family="windows"/>
+ </condition>
+ <condition property="wscompile" value="${env.S1AS_HOME}/bin/wscompile">
+ <not>
+ <os family="windows"/>
+ </not>
+ </condition>
+ </target>
+ <target name="set-asadmin" >
+ <condition property="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin.bat">
+ <os family="windows"/>
+ </condition>
+ <condition property="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin">
+ <not>
+ <os family="windows"/>
+ </not>
+ </condition>
+ </target>
+
+
+
+
+ <target name="prepare" depends="init"
+ description="Creates the build directory" >
+ <echo message="Creating the required directories...." />
+ <mkdir dir="${build}" />
+ </target>
+
+
+ <target name="init" >
+ <tstamp/>
+ <condition property="stub.file" value="${appname}Client.jar">
+ <available file="${appname}Client.jar"/>
+ </condition>
+ <condition property="deploy.file" value="${assemble.ear}/${ear}">
+ <available file="${assemble.ear}/${ear}"/>
+ </condition>
+ <condition property="deploy.file" value="${assemble.war}/${war.file}">
+ <available file="${assemble.war}/${war.file}"/>
+ </condition>
+ <property name="deploy.file" value="${war.file}"/>
+
+ <condition property="verify.file" value="${assemble.ear}/${ear}">
+ <available file="${assemble.ear}/${ear}"/>
+ </condition>
+ <condition property="verify.file" value="${assemble.war}/${war.file}">
+ <available file="${assemble.war}/${war.file}"/>
+ </condition>
+ <property name="verify.file" value="${war.file}"/>
+ </target>
+
+
+
+ <path id="db.classpath">
+ <fileset dir="${db.root}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="create-db_common"
+ depends="init,start-db,delete-db"
+ description="Create database tables and populate database." >
+
+ <sql driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.password}"
+ classpathref="db.classpath"
+ delimiter="${db.delimiter}"
+ autocommit="false"
+ onerror="abort" >
+ <transaction src="${sql.script}"/>
+ </sql>
+ </target>
+
+ <target name="delete-db"
+ description="Deletes the database tables." >
+
+ <sql driver="${db.driver}"
+ url="${db.url}"
+ userid="${db.user}"
+ password="${db.password}"
+ classpathref="db.classpath"
+ delimiter="${db.delimiter}"
+ autocommit="false"
+ onerror="continue" >
+ <transaction src="${delete.sql.script}"/>
+ </sql>
+ </target>
+
+ <target name="ping-db"
+ description="Checks to see if Derby is running." >
+ <java classname="org.apache.derby.drda.NetworkServerControl"
+ fork="yes"
+ resultproperty="db.ping.result">
+ <jvmarg line="${db.jvmargs}" />
+ <arg line="ping" />
+ <classpath refid="db.classpath" />
+ </java>
+ <condition property="db.running">
+ <equals arg1="${db.ping.result}" arg2="0" />
+ </condition>
+ </target>
+
+ <target name="start-db"
+ unless="db.running"
+ description="Starts the Derby databse server."
+ depends="ping-db">
+
+ <sun-appserv-admin
+ explicitcommand="start-database" />
+ </target>
+
+ <target name="stop-db"
+ description="Stops the Derby database server."
+ depends="ping-db"
+ if="db.running">
+ <sun-appserv-admin
+ explicitcommand="stop-database" />
+ </target>
+
+ <target name="admin_command_common">
+ <echo message="Doing admin task ${admin.command}"/>
+ <sun-appserv-admin
+ command="${admin.command}"
+ user="${admin.user}"
+ passwordfile="${admin.password.file}"
+ host="${admin.host}"
+ port="${admin.port}"
+ asinstalldir="${j2ee.home}" />
+ </target>
+
+ <target name="create-jdbc-resource_common">
+ <antcall target="admin_command_common">
+ <param name="admin.command"
+ value="create-jdbc-resource
+ --connectionpoolid ${conpool.name} ${jdbc.resource.name}" />
+ </antcall>
+ </target>
+
+ <target name="delete-jdbc-resource_common">
+ <antcall target="admin_command_common">
+ <param name="admin.command"
+ value="delete-jdbc-resource ${jdbc.resource.name}" />
+ </antcall>
+ </target>
+
+ <target name="deploy-war">
+ <antcall target="admin_command_common">
+ <param name="admin.command"
+ value="deploy ${war.file}" />
+ </antcall>
+ </target>
+
+ <target name="undeploy-war">
+ <antcall target="admin_command_common">
+ <param name="admin.command"
+ value="undeploy ${example}" />
+ </antcall>
+ </target>
+
+ <property environment="env" />
+
+ <target name="build-service" depends="compile-service,generate-wsdl"
+ description="Executes the targets needed to build the service.">
+ </target>
+
+ <target name="compile-service" depends="prepare"
+ description="Compiles the server-side source code">
+ <echo message="Compiling the server-side source code...."/>
+ <javac
+ srcdir="src"
+ destdir="${build}"
+ includes="**/*.java"
+ excludes="**/*Client.java">
+ <classpath refid="class.path" />
+ </javac>
+ </target>
+
+
+ <target name="listprops"
+ description="Displays values of some of the properties of this build file">
+ <property file="../../common/admin-password.txt" />
+
+ <echo message="Path information" />
+ <echo message="j2ee.home = ${j2ee.home}" />
+ <echo message="j2ee.tutorial.home = ${j2ee.tutorial.home}" />
+ <echo message="env.Path = ${env.Path}" />
+ <echo message="env.PATH = ${env.PATH}" />
+ <echo message="" />
+ <echo message="Classpath information" />
+ <echo message="classpath = ${env.CLASSPATH}" />
+ <echo message="" />
+ <echo message="Admin information" />
+ <echo message="admin.password = ${AS_ADMIN_PASSWORD}" />
+ <echo message="admin.password.file = ${admin.password.file}" />
+ <echo message="admin.host = ${admin.host}" />
+ <echo message="admin.user = ${admin.user}" />
+ <echo message="admin.port = ${admin.port}" />
+ <echo message="https.port = ${https.port}" />
+ <echo message="" />
+ <echo message="Domain information" />
+ <echo message="domain.resources = ${domain.resources}" />
+ <echo message="domain.resources.port = ${domain.resources.port}" />
+ <echo message="" />
+ <echo message="Database information" />
+ <echo message="db.root = ${db.root}" />
+ <echo message="db.driver = ${db.driver}" />
+ <echo message="db.host = ${db.host}" />
+ <echo message="db.port = ${db.port}" />
+ <echo message="db.sid = ${db.sid}" />
+ <echo message="db.url = ${db.url}" />
+ <echo message="db.user = ${db.user}" />
+ <echo message="db.pwd = ${db.pwd}" />
+ <echo message="url.prop = ${url.prop}" />
+ <echo message="ds.class = ${ds.class}" />
+ <echo message="db.jvmargs = ${db.jvmargs}" />
+ </target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/SimpleTest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/doclit/SimpleTest.wsdl
new file mode 100644
index 0000000..502be1d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/SimpleTest.wsdl
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="SimpleTest"
+ targetNamespace="http://SimpleTest.org/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://SimpleTest.org/"
+ xmlns:s="http://SimpleTest.org/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://SimpleTest.org/xsd">
+
+ <element name="echoString">
+ <complexType>
+ <sequence>
+ <element name="inputString"
+ type="xsd:string"
+ nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="StringResponseName">
+ <complexType>
+ <sequence>
+ <element name="responseString"
+ type="xsd:string"
+ nillable="true"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+ <message name="echoString">
+ <part name="body" element="s:echoString"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="return" element="s:StringResponseName"/>
+ </message>
+
+ <portType name="SimpleTest">
+ <operation name="echoString" parameterOrder="body" >
+ <input message="tns:echoString"/>
+ <output message="tns:echoStringResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="SimpleTestBinding" type="tns:SimpleTest">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="http://SimpleTest.org/"/>
+ <input> <soap:body use="literal"/> </input>
+ <output> <soap:body use="literal"/> </output>
+ </operation>
+ </binding>
+
+ <service name="SimpleTestService">
+ <port name="SimpleTestPort" binding="tns:SimpleTestBinding">
+ <soap:address location="http://localhost:1024/doclit/doclit"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/build.properties b/appserver/tests/appserv-tests/devtests/webservice/doclit/build.properties
new file mode 100644
index 0000000..e86f005
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/build.properties
@@ -0,0 +1,28 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="doclit"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/doclit/build.xml
new file mode 100644
index 0000000..7b31edf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/build.xml
@@ -0,0 +1,120 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Rpc Lit" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,assemble,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="doclit"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-ejb"/>
+ </target>
+
+ <target name="assemble" depends="init-common, build, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="SimpleTest.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="DocLitMapping.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="DocLitMapping.xml,META-INF/wsdl/**,doclit/*.class" />
+
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete file="DocLitMapping.xml"/>
+ <delete file="anyRpcModel.txt"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/doclit">
+ <fileset dir="output/doclit"
+ includes="SimpleTest.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <!-- use model -->
+ <param name="wscompile.command"
+ value="-gen -cp . -keep -d output -Xdebugmodel:anyRpcModel.txt -model DocLitMapping.xml wscompile_config.xml"/>
+
+ <!-- use mapping -->
+<!--
+ <param name="wscompile.command"
+ value="-gen -cp . -keep -d output -Xdebugmodel:anyRpcModel.txt -mapping RpcLitMapping.xml wscompile_config.xml"/>
+-->
+ </antcall>
+ <delete dir="output"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ ant clean
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..fd3bced
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>DocLitEjb</ejb-name>
+ <service-endpoint>doclit.SimpleTest</service-endpoint>
+ <ejb-class>doclit.SimpleTestImpl</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>DocLitEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..6c3aec9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>DocLitEjb</ejb-name>
+ <jndi-name>DocLitEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>SimpleTest</port-component-name>
+ <endpoint-address-uri>doclit/SimpleTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/webservices.xml
new file mode 100644
index 0000000..90f7cef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/descriptor/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SimpleTestService</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SimpleTest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>DocLitMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleTest</port-component-name>
+ <wsdl-port xmlns:doclitNS="http://SimpleTest.org/">doclitNS:SimpleTestPort</wsdl-port>
+ <service-endpoint-interface>
+ doclit.SimpleTest
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>DocLitEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/doclit/SimpleTestImpl.java b/appserver/tests/appserv-tests/devtests/webservice/doclit/doclit/SimpleTestImpl.java
new file mode 100644
index 0000000..dac32cd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/doclit/SimpleTestImpl.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2002, 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
+ */
+
+/*
+ * @(#)SimpleTestImpl.java 1.3 02/04/05
+ */
+
+package doclit;
+
+import java.rmi.RemoteException;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+public class SimpleTestImpl implements SessionBean {
+
+ private SessionContext sc;
+
+ public SimpleTestImpl(){}
+
+ public String echoString(String v) throws RemoteException
+ {
+ return v;
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SimpleTestImpl::ejbCreate !!");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/doclit/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/doclit/wscompile_config.xml
new file mode 100644
index 0000000..db0451e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/doclit/wscompile_config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="SimpleTest.wsdl"
+ packageName="doclit"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/annotations-common.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/annotations-common.xml
new file mode 100644
index 0000000..743a418
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/annotations-common.xml
@@ -0,0 +1,203 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<property environment="env"/>
+<property file="${env.APS_HOME}/config.properties"/>
+
+<target name="test-all" depends="clean">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <echo message="Starting Test ${directory}"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <antcall target="deploy">
+ <param name="pkg-name" value="${pkg-name}"/>
+ </antcall>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </condition>
+ <fail message="Deployment failed" if="deploy_failed"/>
+ <antcall target="run"/>
+ <echo message="Removing jar bundle ${server}.jar from autodeploy directory"/>
+
+ <antcall target="undeploy"/>
+ <antcall target="report"/>
+</target>
+
+<target name="clean">
+ <echo message="Clean from ${ant.file}"/>
+ <delete dir="${env.APS_HOME}/build/module/classes"/>
+ <delete dir="${env.APS_HOME}/build/module/archive"/>
+ <mkdir dir="${env.APS_HOME}/build/module/classes"/>
+ <mkdir dir="${env.APS_HOME}/build/module/archive"/>
+</target>
+ <path id="classpath">
+
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="reporter.jar"/>
+ </fileset>
+
+
+ </path>
+
+
+<target name="test-compile">
+ <echo message="Compiling into ${pkg-name}/${server}.class"/>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/*.java">
+ <classpath refid="classpath"/>
+</javac>
+</target>
+
+<target name="compile-client">
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="${client-src-name}">
+ <classpath refid="classpath"/>
+ </javac>
+</target>
+
+<target name="build">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <antcall target="test-compile"/>
+ <echo message="Building with package ${pkg-name}"/>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/**">
+ <metainf dir="${pkg-name}"
+ includes="*.xml **/*.wsdl **/*.xsd"/>
+ </jar>
+</target>
+
+<target name="deploy">
+ <antcall target="build"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </or>
+ </waitfor>
+</target>
+
+<target name="undeploy">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="${server}.jar"/>
+ </antcall>
+ <condition property="undeploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployed"/>
+ </condition>
+ <condition property="undeploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_undeployFailed"/>
+ </condition>
+ <fail if="undeploy_failed" message="undeployment failed"/>
+</target>
+
+
+<target name="autoundeploy-file">
+ <delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${filename}"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${filename}_undeployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${filename}_undeployFailed"/>
+ </or>
+ </waitfor>
+</target>
+
+<target name="report" depends="internal-report-success, internal-report-failure">
+ <delete file="${env.S1AS_HOME}/domains/domain1/autodeploy/${class-name}_*"/>
+</target>
+
+<target name="run">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </condition>
+ <antcall target="prepare-client"/>
+ <antcall target="internal-run"/>
+<!--restore the tokens back in file-->
+ <replace file="client/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="client/Client.java" token="${http.port}" value="HTTP_PORT"/>
+</target>
+
+<target name="wsdl-import">
+ <antcall target="configurable-wsdl-import">
+ <param name="host-name" value="${http.host}"/>
+ <param name="host-port" value="${http.port}"/>
+ <param name="protocol" value="http"/>
+ </antcall>
+</target>
+
+<target name="configurable-wsdl-import">
+ <echo message="wsimporting ${protocol}://${host-name}:${host-port}/${server}Service/${port}?WSDL; special args are ${wsimport-special-args}"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes ${protocol}://${host-name}:${host-port}/${server}Service/${port}?WSDL"/>
+ </exec>
+</target>
+
+<target name="prepare-client">
+ <!--basename file="${server}" property="port" suffix="EJB"/-->
+ <basename file="${server}" property="port"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="${server}"/>
+ <param name="port" value="${port}"/>
+ </antcall>
+
+ <replace file="client/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="client/Client.java" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="compile-client"/>
+ <antcall target="unjar-client-utils"/>
+</target>
+
+<target name="unjar-client-utils">
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+</target>
+
+<target name="internal-run" if="deploy_succeeded">
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client} ${app-client-parameters} ${app-client-extra-parameters}"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg line="${client-pkg-name}.${client} ${app-client-parameters} ${app-client-extra-parameters}"/>
+ </exec>
+</target>
+
+<target name="internal-report-success" if="undeploy_succeeded">
+ <antcall target="report-success"/>
+</target>
+
+<target name="internal-report-failure" if="undeploy_failed, deploy_failed">
+ <antcall target="report-failure"/>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.properties
new file mode 100644
index 0000000..e909636
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="async"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.xml
new file mode 100644
index 0000000..d3e3a28
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/build.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="async" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <antcall target="pkg-ejb-jar">
+ <param name="jar.classes" value="endpoint"/>
+ <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/AddNumbersImplService/AddNumbersImpl?WSDL"/>
+ <replace file="custom-client.xml" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="custom-client.xml" value="${http.port}" token="HTTP_PORT"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -b custom-client.xml -d ${build.classes.dir}/client http://${http.host}:${http.port}/AddNumbersImplService/AddNumbersImpl?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ejb-jar">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="async-ejb-test"/>
+ </antcall>
+ <!--restore the tokens back in file-->
+ <replace file="custom-client.xml" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="custom-client.xml" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/client/Client.java
new file mode 100644
index 0000000..2103218
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/client/Client.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("async-ejb-service");
+ Client client = new Client();
+ client.doSyncTest();
+ client.doASyncPollTest();
+ client.doASyncCallBackTest();
+ stat.printSummary("async-ejb-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ int ret = port.addNumbers(2222, 1234);
+ if(ret!=(2222+1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-ejb-service-sync-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-ejb-service-sync-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-ejb-service-sync-test", stat.FAIL);
+ }
+ }
+
+ private void doASyncPollTest () {
+ System.out.println ("Invoking Asynchronous Polling addNumbers");
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ Response<AddNumbersResponse> resp = port.addNumbersAsync(1234, 5678);
+ Thread.sleep (2000);
+ AddNumbersResponse output = resp.get();
+ int ret = output.getReturn();
+ if(ret!=(1234+5678)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-ejb-service-poll-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-ejb-service-poll-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-ejb-service-poll-test", stat.FAIL);
+ }
+ }
+
+ public void doASyncCallBackTest () {
+ System.out.println ("Invoking Asynchronous Callback addNumbers");
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ AddNumbersCallbackHandler cbh = new AddNumbersCallbackHandler();
+ Future<?> response = port.addNumbersAsync(9876, 5432, cbh);
+ Thread.sleep (2000);
+ AddNumbersResponse output = cbh.getResponse ();
+ int ret = output.getReturn();
+ if(ret!=(9876+5432)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("async-ejb-service-callbackhandler-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-ejb-service-callbackhandler-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-ejb-service-callbackhandler-test", stat.FAIL);
+ }
+ }
+
+ // The actual call back handler
+ private class AddNumbersCallbackHandler implements AsyncHandler<AddNumbersResponse> {
+ private AddNumbersResponse output;
+ public void handleResponse (Response<AddNumbersResponse> response) {
+ try {
+ output = response.get ();
+ } catch (ExecutionException e) {
+ e.printStackTrace ();
+ } catch (InterruptedException e) {
+ e.printStackTrace ();
+ }
+ }
+
+ AddNumbersResponse getResponse (){
+ return output;
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/custom-client.xml
new file mode 100644
index 0000000..633f712
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/custom-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="http://HTTP_HOST:HTTP_PORT/AddNumbersImplService/AddNumbersImpl?WSDL"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ <enableAsyncMapping>true</enableAsyncMapping>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..da197b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/async/endpoint/AddNumbersImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class AddNumbersImpl {
+ public int addNumbers(int n1, int n2) {
+ System.out.println ("Received ejb add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/build.xml
new file mode 100644
index 0000000..d0669de
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/WebServiceEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="all" depends="clean, deploy, private-run, private-undeploy, report"/>
+
+
+ <target name="private-undeploy">
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="EjbClient.jar"/>
+ </antcall>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="WebServiceEJB.jar"/>
+ </antcall>
+ </target>
+
+
+ <target name="private-run">
+ <antcall target="clean"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/WebServiceEJBService/WebServiceEJB?WSDL"/>
+ <replace file="custom-client.xml" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="custom-client.xml" value="${http.port}" token="HTTP_PORT"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -b custom-client.xml -d ${env.APS_HOME}/build/module/classes http://${http.host}:${http.port}/WebServiceEJBService/WebServiceEJB?WSDL"/>
+ </exec>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/HelloEJB.java">
+ <classpath refid="classpath"/>
+ </javac>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/**,endpoint/**"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </condition>
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+
+<!--restore the tokens back in file-->
+ <replace file="custom-client.xml" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="custom-client.xml" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/client/Client.java
new file mode 100644
index 0000000..f3fd3d7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/client/Client.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.ejb.EJB;
+import ejb.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @EJB(mappedName="ejb.Hello")
+ static Hello hello;
+
+ public static void main(String[] args) {
+ stat.addDescription("async-ejb-client");
+ Client client = new Client();
+ client.doSyncTest();
+ client.doAsyncPollTest();
+ client.doAsyncCallbackTest();
+ stat.printSummary("async-ejb-client");
+ }
+
+ public void doSyncTest() {
+ try {
+ String ret = hello.invokeSync("Hello Tester !");
+ if(ret.indexOf("SYNC CALL") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("async-sync-ejb-client", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-sync-ejb-client", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-sync-ejb-client", stat.FAIL);
+ }
+ }
+
+ public void doAsyncPollTest() {
+ try {
+ String ret = hello.invokeAsyncPoll("Hello Tester !");
+ if(ret.indexOf("ASYNC POLL CALL") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("async-poll-ejb-client", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-poll-ejb-client", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-poll-ejb-client", stat.FAIL);
+ }
+ }
+
+ public void doAsyncCallbackTest() {
+ try {
+ String ret = hello.invokeAsyncCallBack("Hello Tester !");
+ if(ret.indexOf("ASYNC CALL BACK CALL") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("async-callback-ejb-client", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("async-callback-ejb-client", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("async-callback-ejb-client", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/custom-client.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/custom-client.xml
new file mode 100644
index 0000000..8857cca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/custom-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="http://HTTP_HOST:HTTP_PORT/WebServiceEJBService/WebServiceEJB?WSDL"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="ejb"/>
+ <enableAsyncMapping>true</enableAsyncMapping>
+ </bindings>
+</bindings>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/Hello.java
new file mode 100644
index 0000000..12c5ecd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Hello {
+ public String invokeSync(String msg);
+ public String invokeAsyncPoll(String msg);
+ public String invokeAsyncCallBack(String msg);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/HelloEJB.java
new file mode 100644
index 0000000..db7df1c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/ejb/HelloEJB.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.ejb.Stateless;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.SayHelloResponse;
+
+@Stateless
+public class HelloEJB implements Hello {
+
+
+ @WebServiceRef
+ WebServiceEJBService webService;
+
+ public String invokeSync(String string) {
+ WebServiceEJB ejb = webService.getWebServiceEJBPort();
+ return ejb.sayHello("SYNC CALL" + string);
+ }
+
+ public String invokeAsyncPoll(String msg) {
+ try {
+ WebServiceEJB ejb = webService.getWebServiceEJBPort();
+ Response<SayHelloResponse> resp = ejb.sayHelloAsync("ASYNC POLL CALL" + msg);
+ Thread.sleep (2000);
+ SayHelloResponse out = resp.get();
+ return(out.getReturn());
+ } catch(Throwable t) {
+ return(t.getMessage());
+ }
+ }
+
+ public String invokeAsyncCallBack(String msg) {
+ try {
+System.out.println("VIJ - invoking async call back");
+ WebServiceEJB ejb = webService.getWebServiceEJBPort();
+ MyCallBackHandler cbh = new MyCallBackHandler();
+ Future<?> response =
+ ejb.sayHelloAsync("ASYNC CALL BACK CALL" + msg, cbh);
+ Thread.sleep (2000);
+ SayHelloResponse out = cbh.getResponse ();
+ return(out.getReturn());
+ } catch(Throwable t) {
+ return(t.getMessage());
+ }
+ }
+
+ // The actual call back handler
+ private class MyCallBackHandler implements
+ AsyncHandler<SayHelloResponse> {
+ private SayHelloResponse output;
+ public void handleResponse (Response<SayHelloResponse> response) {
+ try {
+ output = response.get ();
+ } catch (ExecutionException e) {
+ e.printStackTrace ();
+ } catch (InterruptedException e) {
+ e.printStackTrace ();
+ }
+ }
+
+ SayHelloResponse getResponse (){
+ return output;
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/endpoint/WebServiceEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/endpoint/WebServiceEJB.java
new file mode 100644
index 0000000..a4b6fe4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/asyncejbclient/endpoint/WebServiceEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class WebServiceEJB {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.properties
new file mode 100644
index 0000000..25afd85
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="bigint"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.xml
new file mode 100644
index 0000000..c4bd333
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/build.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="bigint" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="persistence.xml" todir="${build.classes.dir}/META-INF"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/CustomerManagerService/CustomerManager?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/CustomerManagerService/CustomerManager?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ejb-jar" depends="setToolProperty">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-database"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="deploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--upload=true"/>
+ <arg line="--dropandcreatetables"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${assemble.dir}/${appname}-ejb.jar"/>
+ </exec>
+ </target>
+
+ <target name="undeploy" depends="init-common,setToolProperty">
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="undeploy"/>
+ <arg line="${as.props}"/>
+ <arg line="--droptables=true"/>
+ <arg line="--cascade=true"/>
+ <arg line="--target ${appserver.instance.name}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="stop-database"/>
+ </exec>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="async-ejb-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/client/Client.java
new file mode 100644
index 0000000..ec35e6f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/client/Client.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import java.math.BigInteger;
+import endpoint.*;
+import java.util.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/CustomerManagerService/CustomerManager?WSDL")
+ static CustomerManagerService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-bigint");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-bigint");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ CustomerManager port = service.getCustomerManagerPort();
+ Customer ret = port.createCustomer(new BigInteger("1212"), "vijay");
+ boolean found = false;
+ List<Object> retList = port.getCustomerList();
+ Iterator it = retList.iterator();
+ while(it.hasNext()) {
+ Customer c = (Customer)it.next();
+ String name = c.getName();
+ BigInteger bi = c.getBigInteger();
+ System.out.println("Name -> " + name +
+ "; BigInt = " + bi.intValue());
+ if(("vijay".equals(name)) && (bi.intValue() == 1212)) {
+ found=true;
+ }
+ }
+ if(!found) {
+ System.out.println("Entity not persisted as expected");
+ stat.addStatus("ejb-bigint-test", stat.FAIL);
+ } else {
+ port.removeCustomer("vijay");
+ stat.addStatus("ejb-bigint-test", stat.PASS);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-bigint-test", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/Customer.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/Customer.java
new file mode 100644
index 0000000..451194d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/Customer.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.math.BigInteger;
+import javax.persistence.*;
+
+@Entity public class Customer implements java.io.Serializable {
+ BigInteger bigInteger;
+ @Id String name;
+ public Customer(){}
+ public Customer(BigInteger bi, String name) {
+ this.bigInteger = bi;
+ this.name = name;
+ }
+ public BigInteger getBigInteger() { return this.bigInteger;}
+ public String getName() { return this.name;}
+ public void setBigInteger(BigInteger b) { this.bigInteger = b;}
+ public void setName(String n) { this.name = n;}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/CustomerManager.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/CustomerManager.java
new file mode 100644
index 0000000..2cbb7ee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/endpoint/CustomerManager.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.math.BigInteger;
+import java.util.*;
+import javax.jws.*;
+import javax.ejb.*;
+import javax.persistence.*;
+
+@Stateless
+@WebService
+public class CustomerManager {
+ @PersistenceContext EntityManager em;
+
+ @WebMethod
+ public Customer createCustomer( BigInteger code, String name) {
+ System.out.println("createCustomer " + code + " " + name);
+ Customer customer = new Customer( code, name );
+ em.persist( customer );
+ return customer;
+ }
+
+ @WebMethod
+ public Collection getCustomerList() {
+ System.out.println("getCustomerList");
+ String ejbQL = "SELECT c FROM Customer c";
+ return em.createQuery( ejbQL ).getResultList();
+ }
+
+ @WebMethod
+ public int removeCustomer(String id) {
+ System.out.println("removeCustomer");
+ String ejbQL = "DELETE FROM Customer c WHERE c.name = \""+id+"\"";
+ int ret = em.createQuery( ejbQL ).executeUpdate();
+ return ret;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/persistence.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/persistence.xml
new file mode 100644
index 0000000..bff1c9e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/bigint/persistence.xml
@@ -0,0 +1,21 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+ <persistence-unit name="PU1"/>
+</persistence>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/build.xml
new file mode 100644
index 0000000..036906a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/build.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="webservice ejb annotations" default="all" basedir=".">
+ <target name="all">
+ <ant dir="noname" target="all"/>
+ <ant dir="nointf" target="all"/>
+ <ant dir="security" target="all"/>
+ <!--ant dir="provider" target="all"/-->
+ <ant dir="oneway" target="all"/>
+ <ant dir="wsctxtinterceptor" target="all"/>
+ <ant dir="ejbclient" target="all"/>
+ <ant dir="msgctxt" target="all"/>
+ <ant dir="asyncejbclient" target="all"/>
+ <ant dir="serviceejbclient" target="all"/>
+ <ant dir="portejbclient" target="all"/>
+ <ant dir="localremoteejbwebservice" target="all"/>
+ <ant dir="libdependent" target="all"/>
+ <ant dir="messagectxt" target="all"/>
+ <ant dir="singleton" target="all"/>
+ <ant dir="msgctxinterceptor" target="all"/>
+ <ant dir="ejbwebservicesinwar" target="all"/>
+ <ant dir="ejbwebservicesinwar-2" target="all"/>
+ <ant dir="ejbwebservicesinwar-3" target="all"/>
+ <ant dir="ejbwebservicesinwar-sessioncontext" target="all"/>
+ <ant dir="ejbwebservicesinwar-interceptor" target="all"/>
+ <ant dir="ejbservletwebservicesinwar" target="all"/>
+ <ant dir="async" target="all"/>
+ <!--<ant dir="bigint" target="all"/>-->
+ <ant dir="libdependent" target="all"/>
+ <ant dir="libdependent-2" target="all"/>
+ <ant dir="svchandler" target="all"/>
+ <ant dir="wsctxt" target="all"/>
+ <ant dir="sessionctx" target="all"/>
+ <ant dir="wsnameejbname" target="all"/>
+ <ant dir="dependencynoinjection" target="all"/>
+ <ant dir="exception" target="all"/>
+ <ant dir="methodinjection" target="all"/>
+ <ant dir="invalidmethodinjection" target="all"/>
+ <ant dir="portdependencynoinjection" target="all"/>
+ <ant dir="portfieldinjection" target="all"/>
+ <ant dir="portmethodinjection" target="all"/>
+ <ant dir="wsRef-webservice-features" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/build.xml
new file mode 100644
index 0000000..a94fb52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/client/Client.java
new file mode 100644
index 0000000..efae8e7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/client/Client.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+@WebServiceRef(name="service/helloservice", wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL", type=endpoint.HelloImplService.class)
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ws-dependency-no-injection");
+ try {
+ Context ic = new InitialContext();
+
+ service = (HelloImplService) ic.lookup("java:comp/env/service/helloservice");
+ } catch(Throwable t) {
+ t.printStackTrace();
+ System.out.println("Dependency lookup failed : " + t.getMessage());
+ stat.addStatus("ws-dependency-no-injection", stat.FAIL);
+ }
+ System.out.println("Service is " + service);
+ if (service!=null) {
+ Client client = new Client();
+ client.doTest(args);
+ }
+ stat.printSummary("ws-dependency-no-injection");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ws-ejb-method-injection", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ws-dependency-no-injection", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ws-dependency-no-injection", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/dependencynoinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/build.xml
new file mode 100644
index 0000000..f7ca438
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/WebServiceEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="all" depends="clean, deploy, private-run, private-undeploy, report"/>
+
+
+ <target name="private-undeploy">
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="EjbClient.jar"/>
+ </antcall>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="WebServiceEJB.jar"/>
+ </antcall>
+ </target>
+
+
+ <target name="private-run">
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="WebServiceEJB"/>
+ <param name="port" value="WebServiceEJB"/>
+ </antcall>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/HelloEJB.java">
+ <classpath refid="classpath"/>
+ </javac>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/**,endpoint/**"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </condition>
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/client/Client.java
new file mode 100644
index 0000000..45b6f86
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/client/Client.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.ejb.EJB;
+import ejb.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @EJB(mappedName="ejb.Hello")
+ static Hello hello;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejbclient-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejbclient-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ for (int i=0;i<10;i++) {
+ String ret = hello.invoke("Hello Tester !");
+ if(ret.indexOf("Hello Tester") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejbclient-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejbclient-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/Hello.java
new file mode 100644
index 0000000..c517daf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/Hello.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Hello {
+ public String invoke(String msg);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/HelloEJB.java
new file mode 100644
index 0000000..89adf0b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/ejb/HelloEJB.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.ejb.Stateless;
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.WebServiceEJBService;
+import endpoint.WebServiceEJB;
+
+@Stateless
+public class HelloEJB implements Hello {
+
+
+ @WebServiceRef
+ WebServiceEJBService webService;
+
+ public String invoke(String string) {
+ System.out.println("invoked with " + string);
+ System.out.println("getting the port now from " + webService);
+ WebServiceEJB ejb = webService.getWebServiceEJBPort();
+ System.out.println("got " + ejb);
+ return ejb.sayHello(string);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/endpoint/WebServiceEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/endpoint/WebServiceEJB.java
new file mode 100644
index 0000000..a4b6fe4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbclient/endpoint/WebServiceEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class WebServiceEJB {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/README
new file mode 100644
index 0000000..2d1447c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/README
@@ -0,0 +1,3 @@
+
+This tests for clients with ejb and servlet based web services packaged together in war and also with @WebserviceRefs
+for ports.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.properties
new file mode 100644
index 0000000..b1fdcaf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbservletwebservicesinwar"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.xml
new file mode 100644
index 0000000..b653900
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/build.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="ejbservletwebservicesinwar" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <echo message="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p ejbclient -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloEjbService/Hello?WSDL"/>
+ </antcall>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p webclient -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/${appname}/HelloService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client-web.xml
new file mode 100644
index 0000000..0fb0f1b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>webclient.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client/TestClient.java
new file mode 100644
index 0000000..e422760
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static final String testDescription = "ejbservletwebservices-war";
+ public boolean found1 = false;
+ public boolean found2 = false;
+ public boolean found3 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testDescription);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if (line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if (line.indexOf("EJB WS:All") != -1)
+ found2 = true;
+ if (line.indexOf("Servlet WS:All") != -1)
+ found3 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(found1 && found2 && found3) {
+ pass();
+ } else {
+ fail();
+ }
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testDescription, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testDescription, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloEjb.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloEjb.java
new file mode 100644
index 0000000..4ae4e61
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloEjb.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.SessionContext;
+import javax.annotation.Resource;
+
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloEjbService",
+ targetNamespace="http://example.com/Hello"
+)
+public class HelloEjb {
+@Resource
+ private SessionContext sc;
+
+ public HelloEjb() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "EJB WS:" + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloWS.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloWS.java
new file mode 100644
index 0000000..04dad33
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/endpoint/HelloWS.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+
+
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class HelloWS {
+
+ public HelloWS() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "Servlet WS:" + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient/Client.java
new file mode 100644
index 0000000..b93c80c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbservletwebservicesinwar/webclient/Client.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 webclient;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import ejbclient.*;
+import webclient.*;
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(ejbclient.HelloEjbService.class)
+ ejbclient.Hello hiport1;
+
+ @javax.xml.ws.WebServiceRef(webclient.HelloService.class)
+ webclient.Hello hiport2;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret1 = hiport1.sayHello("All");
+ String ret2 = hiport2.sayHello("All");
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret1 + "]");
+ out.println("[" + ret2 + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/README
new file mode 100644
index 0000000..88ffb3d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/README
@@ -0,0 +1,2 @@
+
+This tests for clients with ejbs in war and also with @WebserviceRefs for ports
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.properties
new file mode 100644
index 0000000..18538d4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwebservicesinwar-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.xml
new file mode 100644
index 0000000..731cc5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/build.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ejbwebservicesinwar-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloService/Hello?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/endpoint/Hello.java
new file mode 100644
index 0000000..8a26e59
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/endpoint/Hello.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+//@Resource
+ // private SessionContext sc;
+
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/webclient/Client.java
new file mode 100644
index 0000000..11f79c5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-2/webclient/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ Hello hiport;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret = hiport.sayHello("All");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/README
new file mode 100644
index 0000000..88ffb3d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/README
@@ -0,0 +1,2 @@
+
+This tests for clients with ejbs in war and also with @WebserviceRefs for ports
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.properties
new file mode 100644
index 0000000..d8f481b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwebservicesinwar-3"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.xml
new file mode 100644
index 0000000..731cc5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/build.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ejbwebservicesinwar-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloService/Hello?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client/TestClient.java
new file mode 100644
index 0000000..e1665b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("ejbwebservices-war-3");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("ejbwebservices-war-3");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("ejbwebservices-war-3", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("ejbwebservices-war-3", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/endpoint/Hello.java
new file mode 100644
index 0000000..0d18621
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/endpoint/Hello.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+import javax.xml.ws.WebServiceContext;
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+@Resource
+ private WebServiceContext sc;
+
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/webclient/Client.java
new file mode 100644
index 0000000..11f79c5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-3/webclient/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ Hello hiport;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret = hiport.sayHello("All");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/README
new file mode 100644
index 0000000..08b7204
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/README
@@ -0,0 +1,3 @@
+
+This tests for clients with ejbs in war and also with @WebserviceRefs for ports
+This is for bug http://monaco.sfbay/detail.jsf?cr=6956406 and 12133
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.properties
new file mode 100644
index 0000000..8fa0abb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwebservicesinwar-interceptor"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.xml
new file mode 100644
index 0000000..731cc5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/build.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ejbwebservicesinwar-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloService/Hello?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client/TestClient.java
new file mode 100644
index 0000000..4c025d9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("ejbwebservices-war-interceptor");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("ejbwebservices-war-interceptor");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[sayHello]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("ejbwebservices-war-interceptor", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("ejbwebservices-war-interceptor", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/Hello.java
new file mode 100644
index 0000000..c0dd02f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/Hello.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+@Resource
+ private SessionContext sc;
+
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ @javax.interceptor.Interceptors(SimpleInterceptor.class)
+ public String sayHello(Object who) {
+ return "Hello " + who ;
+
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/SimpleInterceptor.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/SimpleInterceptor.java
new file mode 100644
index 0000000..3637fea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/endpoint/SimpleInterceptor.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+public class SimpleInterceptor {
+
+ @javax.interceptor.AroundInvoke
+ public Object intercept(javax.interceptor.InvocationContext ic) {
+ Object o = ic.getMethod().getName();
+ System.out.println("Inside interceptor");
+ return o;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/webclient/Client.java
new file mode 100644
index 0000000..11f79c5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-interceptor/webclient/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ Hello hiport;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret = hiport.sayHello("All");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/README
new file mode 100644
index 0000000..b99f1a4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/README
@@ -0,0 +1,3 @@
+
+This tests for clients with ejbs in war and also with @WebserviceRefs for ports
+This is for bug http://monaco.sfbay/detail.jsf?cr=6956406
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.properties
new file mode 100644
index 0000000..581af77
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwebservicesinwar-sessioncontext"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.xml
new file mode 100644
index 0000000..731cc5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/build.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="ejbwebservicesinwar-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloService/Hello?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client/TestClient.java
new file mode 100644
index 0000000..a39ce27
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("ejbwebservices-war-sessioncontext");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("ejbwebservices-war-sessioncontext");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("ejbwebservices-war-sessioncontext", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("ejbwebservices-war-sessioncontext", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/endpoint/Hello.java
new file mode 100644
index 0000000..a2b86c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/endpoint/Hello.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.annotation.Resource;
+import javax.ejb.SessionContext;
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+@Resource
+ private SessionContext sc;
+
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "Hello " + who ;
+
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/webclient/Client.java
new file mode 100644
index 0000000..11f79c5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar-sessioncontext/webclient/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ Hello hiport;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String ret = hiport.sayHello("All");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/README
new file mode 100644
index 0000000..a2906d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/README
@@ -0,0 +1,2 @@
+This test is for bug 6852
+When the page for webservices is clicked the endpoint address should contain host name and port name and not just the URL pattern
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.properties
new file mode 100644
index 0000000..18b4ccc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwebservicesinwar"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.xml
new file mode 100644
index 0000000..14cc5fd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/build.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="HelloService/Hello?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.Client">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/HelloService/Hello?wsdl"/>
+ </java>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/client/Client.java
new file mode 100644
index 0000000..77dfd07
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/client/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.net.*;
+import java.io.*;
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public static void main(String[] args) {
+ stat.addDescription("ejbwebservicesinwar");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejbwebservicesinwar");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ URL serviceInfo = new URL (args[0]);
+ URLConnection con = serviceInfo.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+ String inputLine;
+ int index=0;
+ while ((inputLine = in.readLine()) != null) {
+ if ((index= inputLine.indexOf("message="))>0){
+
+ String url = inputLine.substring(index+7);
+ if (url.indexOf("sayHello")>0) {
+ stat.addStatus("ejbwebservicesinwar", stat.PASS);
+ }
+ System.out.println(inputLine);
+ }
+ }
+ in.close();
+ stat.addStatus("ejbwebservicesinwar", stat.FAIL);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/endpoint/Hello.java
new file mode 100644
index 0000000..2a61d1e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/endpoint/Hello.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.SessionContext;
+import javax.annotation.Resource;
+
+
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+@Resource
+ private SessionContext sc;
+
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwebservicesinwar/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/Hello.xsd b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/Hello.xsd
new file mode 100644
index 0000000..7495931
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/Hello.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.2-10/10/2010 12:09 AM(ramapulavarthi)-. -->
+<xs:schema xmlns:tns="http://example.com/Hello" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://example.com/Hello">
+
+<xs:element name="sayHello" type="tns:sayHello"/>
+
+<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+
+<xs:complexType name="sayHello">
+<xs:sequence>
+<xs:element name="arg0" type="xs:string" minOccurs="0"/>
+</xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="sayHelloResponse">
+<xs:sequence>
+<xs:element name="return" type="xs:string" minOccurs="0"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/HelloService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/HelloService.wsdl
new file mode 100644
index 0000000..2ecbfb4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/HelloService.wsdl
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/Hello"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://example.com/Hello" name="HelloService">
+ <wsp:Policy xmlns:wsapw3c="http://www.w3.org/2006/05/addressing/wsdl" wsu:Id="Policy-WSAM_Addressing_Policy">
+ <ns1:OptimizedMimeSerialization
+ xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"
+ wsp:Optional="true"/>
+ <wsapw3c:UsingAddressing/>
+ <wsam:Addressing>
+ <wsp:Policy>
+ <wsam:AnonymousResponses/>
+ </wsp:Policy>
+ </wsam:Addressing>
+ </wsp:Policy>
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Hello" schemaLocation="Hello.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="Hello">
+ <operation name="sayHello">
+ <input wsam:Action="urn:SayHello" message="tns:sayHello"/>
+ <output wsam:Action="http://example.com/Hello/Hello/sayHelloResponse" message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloPortBinding" type="tns:Hello">
+ <wsp:PolicyReference URI="#Policy-WSAM_Addressing_Policy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction="urn:SayHello"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloService">
+ <port name="HelloPort" binding="tns:HelloPortBinding">
+ <soap:address location="http://localhost:8080/HelloService/Hello"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.properties
new file mode 100644
index 0000000..fde379a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ejbwsinwarwithwsdl"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.xml
new file mode 100644
index 0000000..88cc758
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/build.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="ejbwsinwarwithwsdl" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="run-wsimport">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/HelloService.wsdl -keep -d ${build.classes.dir} HelloService.wsdl"/>
+ </antcall>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, run-wsimport, compile">
+
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${basedir}"/>
+ <param name="wsdlfile.name" value="HelloService.wsdl"/>
+ <param name="schemafile.location" value="${basedir}"/>
+ <param name="schemafile.name" value="Hello.xsd"/>
+
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="HelloService/Hello?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+
+ <antcall target="undeploy-war-common"/>
+
+ </target>
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="ejbwsinwarwithwsdl"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/client/Client.java
new file mode 100644
index 0000000..c2770e3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/client/Client.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.net.*;
+import java.io.*;
+import com.example.hello.HelloService;
+import com.example.hello.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+
+ public static void main(String[] args) {
+ stat.addDescription("ejbwsinwarwithwsdl");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejbwsinwarwithwsdl");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloService service = new HelloService();
+ Hello client = service.getHelloPort();
+ String result = client.sayHello("Duke");
+ if(result.equals("WebSvcTest-Hello Duke" )) {
+ stat.addStatus("ejbwsinwarwithwsdl", stat.PASS);
+ } else {
+ stat.addStatus("ejbwsinwarwithwsdl", stat.FAIL);
+ }
+
+ /*
+ URL serviceInfo = new URL (args[0]);
+ URLConnection con = serviceInfo.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+
+ String inputLine;
+ int index=0;
+ while ((inputLine = in.readLine()) != null) {
+ if ((index= inputLine.indexOf("href="))>0){
+
+ String url = inputLine.substring(index+1);
+ if (url.indexOf("http:")>0) {
+ stat.addStatus("ejbwsinwarwithwsdl", stat.PASS);
+ }
+ System.out.println(inputLine);
+ }
+ }
+ in.close();
+ stat.addStatus("ejbwsinwarwithwsdl", stat.FAIL);
+ */
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/endpoint/Hello.java
new file mode 100644
index 0000000..87191d3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/endpoint/Hello.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.SessionContext;
+import javax.annotation.Resource;
+
+
+
+@javax.ejb.Stateless
+@WebService(serviceName = "HelloService", portName = "HelloPort", targetNamespace = "http://example.com/Hello", endpointInterface = "com.example.hello.Hello", wsdlLocation = "WEB-INF/wsdl/HelloService.wsdl")
+
+public class Hello {
+@Resource
+ private SessionContext sc;
+
+ public Hello() {}
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/ejbwsinwarwithwsdl/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/client/Client.java
new file mode 100644
index 0000000..77823f1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-exception");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejb-exception");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+
+ // we were supposed to fail !
+ stat.addStatus("ejb-exception", stat.FAIL);
+ } catch(Exception e) {
+ System.out.println("Got expected exception " + e.getMessage());
+ stat.addStatus("ejb-exception", stat.PASS);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/endpoint/HelloImpl.java
new file mode 100644
index 0000000..5e51686
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/exception/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ throw new RuntimeException("I am a bad bad ejb endpoint");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/build.xml
new file mode 100644
index 0000000..8b2f576
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="invalidmethodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/client/Client.java
new file mode 100644
index 0000000..6ce187b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/client/Client.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static void setService(HelloImplService s) {
+
+ System.out.println("Injection sucessful with "+s.getClass().toString());
+ service = s;
+ }
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static int setFoo(HelloImplService s) {
+ service1 = s;
+ return 0;
+ }
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static void myService(String foo, HelloImplService s) {
+ service2 = s;
+ }
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ void setMyService(HelloImplService s) {
+
+ service3 = s;
+ }
+
+
+ static HelloImplService service1=null;
+ static HelloImplService service2=null;
+ static HelloImplService service3=null;
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ HelloImplService service4=null;
+
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ws-ejb-invalidmethodinjection");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ws-ejb-invalidmethodinjection");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ if (service1!=null || service2!=null || service3!=null) {
+ System.out.println("Failed : invalid injection method got injected !");
+ stat.addStatus("ws-ejb-invalidmethodinjection", stat.FAIL);
+ } else {
+ System.out.println("Success : invalid references were not injected");
+ }
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ws-ejb-invalidmethodinjection", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ws-ejb-invalidmethodinjection", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ws-ejb-invalidmethodinjection", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/invalidmethodinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/MANIFEST.MF
new file mode 100644
index 0000000..3226a83
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
+Class-Path: mylib.jar
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.properties
new file mode 100644
index 0000000..daa8e10
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="libdependent-2"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.xml
new file mode 100644
index 0000000..48199dc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/build.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="libdependent-2" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ear"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="outsidepkg"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <jar destfile="${build.classes.dir}/tmp/mylib.jar"
+ basedir="${build.classes.dir}"
+ includes="outsidepkg/**"/>
+ <jar destfile="${build.classes.dir}/tmp/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ manifest="MANIFEST.MF"
+ includes="endpoint/**"/>
+ <jar destfile="${assemble.dir}/${appname}App.ear"
+ basedir="${build.classes.dir}/tmp"
+ includes="**"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ear">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="ejb-libdependent-2-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/client/Client.java
new file mode 100644
index 0000000..c436f8d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/client/Client.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-libdependent-2-service");
+ Client client = new Client();
+ client.doSyncTest();
+ stat.printSummary("ejb-libdependent-2-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ RetVal ret = port.sayHello("Hi LibDependent");
+ if(ret.getRetVal().indexOf("LibDep") == -1) {
+ System.out.println("WRONG GREETING " + ret.getRetVal());
+ stat.addStatus("ejb-libdependent-2-service-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ System.out.println(ret.getRetVal());
+ stat.addStatus("ejb-libdependent-2-service-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-libdependent-2-service-test", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/endpoint/HelloImpl.java
new file mode 100644
index 0000000..518d564
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/endpoint/HelloImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import outsidepkg.RetVal;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public RetVal sayHello(String who) {
+ return new RetVal("WebSvcTest-Hello " + who);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/outsidepkg/RetVal.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/outsidepkg/RetVal.java
new file mode 100644
index 0000000..61cae05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent-2/outsidepkg/RetVal.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 outsidepkg;
+
+public class RetVal {
+ private String value;
+ public RetVal() {}
+ public RetVal(String s) {this.value = s;}
+ public String getRetVal() {return this.value;}
+ public void setRetVal(String s) {this.value=s;}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.properties
new file mode 100644
index 0000000..0850852
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="libdependent"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.xml
new file mode 100644
index 0000000..9a37d58
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="libdependent" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ear"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="outsidepkg"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/lib"/>
+ <jar destfile="${build.classes.dir}/tmp/lib/mylib.jar"
+ basedir="${build.classes.dir}"
+ includes="outsidepkg/**"/>
+ <jar destfile="${build.classes.dir}/tmp/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**"/>
+ <jar destfile="${assemble.dir}/${appname}App.ear"
+ basedir="${build.classes.dir}/tmp"
+ includes="**"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -Xendorsed -d ${build.classes.dir}/client http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ </antcall>
+ <javac verbose="true" srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/modules/webservices-osgi.jar:${env.S1AS_HOME}/modules/webservices-api-osgi.jar:${env.S1AS_HOME}/modules/jaxb-osgi.jar:${env.S1AS_HOME}/modules/jaxb-api-osgi.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ear">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="ejb-libdependent-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/client/Client.java
new file mode 100644
index 0000000..548c5da
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ //@WebServiceRef
+ // static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-libdependent-service");
+ Client client = new Client();
+ client.doSyncTest();
+ stat.printSummary("ejb-libdependent-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ HelloImplService service = new HelloImplService();
+ HelloImpl port = service.getHelloImplPort();
+ RetVal ret = port.sayHello("Hi LibDependent");
+ if(ret.getRetVal().indexOf("LibDep") == -1) {
+ System.out.println("WRONG GREETING " + ret.getRetVal());
+ stat.addStatus("ejb-libdependent-service-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ System.out.println(ret.getRetVal());
+ stat.addStatus("ejb-libdependent-service-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-libdependent-service-test", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/endpoint/HelloImpl.java
new file mode 100644
index 0000000..518d564
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/endpoint/HelloImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import outsidepkg.RetVal;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public RetVal sayHello(String who) {
+ return new RetVal("WebSvcTest-Hello " + who);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/outsidepkg/RetVal.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/outsidepkg/RetVal.java
new file mode 100644
index 0000000..61cae05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/libdependent/outsidepkg/RetVal.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 outsidepkg;
+
+public class RetVal {
+ private String value;
+ public RetVal() {}
+ public RetVal(String s) {this.value = s;}
+ public String getRetVal() {return this.value;}
+ public void setRetVal(String s) {this.value=s;}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/README
new file mode 100644
index 0000000..16e367a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/README
@@ -0,0 +1 @@
+This is test for issue 12479
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/build.xml
new file mode 100644
index 0000000..f7ca438
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/WebServiceEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+
+ <target name="all" depends="clean, deploy, private-run, private-undeploy, report"/>
+
+
+ <target name="private-undeploy">
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="EjbClient.jar"/>
+ </antcall>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="WebServiceEJB.jar"/>
+ </antcall>
+ </target>
+
+
+ <target name="private-run">
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="WebServiceEJB"/>
+ <param name="port" value="WebServiceEJB"/>
+ </antcall>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/HelloEJB.java">
+ <classpath refid="classpath"/>
+ </javac>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/**,endpoint/**"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </condition>
+ <fail if="deploy_failed" message="Deployment failed"/>
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test PASSED"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test FAILED"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/client/Client.java
new file mode 100644
index 0000000..ac6940a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/client/Client.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.ejb.EJB;
+import ejb.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @EJB(mappedName="ejb.Hello")
+ static Hello hello;
+
+ public static void main(String[] args) {
+ stat.addDescription("localremoteejbwebservice-issue");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("localremoteejbwebservice-issue");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ for (int i=0;i<10;i++) {
+ String ret = hello.invoke("Hello Tester !");
+ if(ret.indexOf("Hello Tester") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("localremoteejbwebservice-issue", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("localremoteejbwebservice-issue", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/Hello.java
new file mode 100644
index 0000000..c517daf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/Hello.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface Hello {
+ public String invoke(String msg);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/HelloEJB.java
new file mode 100644
index 0000000..89adf0b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/ejb/HelloEJB.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.ejb.Stateless;
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.WebServiceEJBService;
+import endpoint.WebServiceEJB;
+
+@Stateless
+public class HelloEJB implements Hello {
+
+
+ @WebServiceRef
+ WebServiceEJBService webService;
+
+ public String invoke(String string) {
+ System.out.println("invoked with " + string);
+ System.out.println("getting the port now from " + webService);
+ WebServiceEJB ejb = webService.getWebServiceEJBPort();
+ System.out.println("got " + ejb);
+ return ejb.sayHello(string);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanLocal.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanLocal.java
new file mode 100644
index 0000000..9ad7562
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanLocal.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.ejb.Local;
+
+/**
+ *
+ * @author bhakti
+ */
+@Local
+public interface NewSessionBeanLocal {
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanRemote.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanRemote.java
new file mode 100644
index 0000000..e7d1fcd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/NewSessionBeanRemote.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.ejb.Remote;
+
+/**
+ *
+ * @author bhakti
+ */
+@Remote
+public interface NewSessionBeanRemote {
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/WebServiceEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/WebServiceEJB.java
new file mode 100644
index 0000000..85796c7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/localremoteejbwebservice/endpoint/WebServiceEJB.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.*;
+
+@WebService
+@Stateless
+@Local(NewSessionBeanLocal.class)
+@Remote(NewSessionBeanRemote.class)
+
+public class WebServiceEJB implements NewSessionBeanRemote, NewSessionBeanLocal {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/client/Client.java
new file mode 100644
index 0000000..ad6a557
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-msgctxt");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-msgctxt");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ejb-msgctxt", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-msgctxt", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-msgctxt", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/endpoint/HelloImpl.java
new file mode 100644
index 0000000..9360ab3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/messagectxt/endpoint/HelloImpl.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+import javax.ejb.SessionContext;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ @Resource WebServiceContext ejbsc;
+
+
+ public String sayHello(String who) {
+ if(ejbsc != null) {
+ System.out.println(ejbsc.getMessageContext());
+ if (ejbsc.getMessageContext() instanceof javax.xml.ws.handler.MessageContext){
+ //System.out.println("YYYYY" +ejbsc.getMessageContext().getClass());
+ return "WebSvcTest-Hello " + who;
+}
+ else {
+ // System.out.println("NNN " + ejbsc.getMessageContext().getClass());
+ return "EJB MSGContext injection failed";
+
+}
+ }
+ return "EJB MSGContext injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/build.xml
new file mode 100644
index 0000000..a94fb52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/client/Client.java
new file mode 100644
index 0000000..f3d9ac1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/client/Client.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static void setService(HelloImplService s) {
+ service = s;
+ }
+
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ws-ejb-method-injection");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ws-ejb-method-injection");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ws-ejb-method-injection", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ws-ejb-method-injection", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ws-ejb-method-injection", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/methodinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/build.xml
new file mode 100644
index 0000000..06c7acc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/client/Client.java
new file mode 100644
index 0000000..10d87ea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/client/Client.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloEJBService;
+import endpoint.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("msgctxt-invocationhandlerctxt");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("msgctxt-invocationhandlerctxt");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret == null) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("msgctxt-invocationhandlerctxt", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("msgctxt-invocationhandlerctxt", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("msgctxt-invocationhandlerctxt", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/Hello.java
new file mode 100644
index 0000000..b8657e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/Hello.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/HelloEJB.java
new file mode 100644
index 0000000..f6bd0d2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/HelloEJB.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+@WebService(endpointInterface="endpoint.Hello")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource WebServiceContext wsc;
+
+ public String sayHello(String who) {
+ Map<String, Object> msgCtxt = wsc.getMessageContext();
+ return msgCtxt.toString();
+ }
+
+ @AroundInvoke
+ private Object interceptBusinessMethod(InvocationContext invCtx) {
+ try {
+ System.out.println("ContextData" + invCtx.getContextData());
+ //This is just to get the invocation trace
+ //remove once bug is fixed
+ Exception e = new Exception();
+ e.printStackTrace();
+ if (invCtx.getContextData() instanceof javax.xml.ws.handler.MessageContext){
+ System.out.println("ContextDataMap is an instance of javax.xml.ws.handler.MessageContext ");
+
+ return invCtx.proceed();
+ } else {
+ return null;
+ }
+ } catch(Throwable t) { t.printStackTrace();}
+ return null;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/ejb-jar.xml
new file mode 100644
index 0000000..25844af
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxinterceptor/endpoint/ejb-jar.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="false" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+<enterprise-beans>
+<session>
+<display-name>HelloEJB</display-name>
+<ejb-name>HelloEJB</ejb-name>
+<business-local>endpoint.Hello</business-local>
+<service-endpoint>endpoint.Hello</service-endpoint>
+<ejb-class>endpoint.HelloEJB</ejb-class>
+<session-type>Stateless</session-type>
+<transaction-type>Container</transaction-type>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</session>
+</enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/client/Client.java
new file mode 100644
index 0000000..ad6a557
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-msgctxt");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-msgctxt");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ejb-msgctxt", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-msgctxt", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-msgctxt", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/endpoint/HelloImpl.java
new file mode 100644
index 0000000..0567991
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/msgctxt/endpoint/HelloImpl.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ @Resource WebServiceContext ejbsc;
+
+ public String sayHello(String who) {
+ System.out.println("EJB WSCTXT wsc = " + ejbsc);
+ javax.xml.ws.handler.MessageContext m = ejbsc.getMessageContext();
+ if(m == null)
+ return "WebService Context injection failed";
+ if(ejbsc != null)
+ return "WebSvcTest-Hello " + who;
+ return "EJB WebServiceContext injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/HttpTestService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/HttpTestService.wsdl
new file mode 100644
index 0000000..a9bdfdd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/HttpTestService.wsdl
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="HttpTestService"
+ targetNamespace="http://httptestservice.org/wsdl"
+ xmlns:tns="http://httptestservice.org/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:ns="http://httptestservice.org/types"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <schema targetNamespace="http://httptestservice.org/types"
+ xmlns:tns="http://httptestservice.org/types"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="HelloRequest">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="HelloResponse">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Hello1Request">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ <complexType name="Hello1Response">
+ <sequence>
+ <element name="string" type="string" nillable="true"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+ <message name="Hello_helloRequest">
+ <part name="parameters" type="ns:HelloRequest"/>
+ </message>
+ <message name="Hello_helloResponse">
+ <part name="result" type="ns:HelloResponse"/>
+ </message>
+ <message name="Hello1_hello1Request">
+ <part name="parameters" type="ns:Hello1Request"/>
+ </message>
+ <message name="Hello1_hello1Response">
+ <part name="result" type="ns:Hello1Response"/>
+ </message>
+ <portType name="Hello">
+ <operation name="hello">
+ <input message="tns:Hello_helloRequest"/>
+ <output message="tns:Hello_helloResponse"/>
+ </operation>
+ </portType>
+ <portType name="Hello1">
+ <operation name="hello1">
+ <input message="tns:Hello1_hello1Request"/>
+ <output message="tns:Hello1_hello1Response"/>
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </output>
+ </operation>
+ </binding>
+ <binding name="Hello1Binding" type="tns:Hello1">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello1">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://httptestservice.org/wsdl"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HttpTestService">
+ <port name="HelloPort" binding="tns:HelloBinding">
+ <soap:address location="http://localhost:8080/wsdltojava/ws4ee"/>
+ </port>
+ <port name="Hello1Port" binding="tns:Hello1Binding">
+ <soap:address location="http://localhost:8080/wsdltojava/ws4ee"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.properties
new file mode 100644
index 0000000..fb51256
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="multiport"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.xml
new file mode 100644
index 0000000..b8c5424
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="multiport" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, run, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="service"/>
+ </antcall>
+ </target>
+
+ <target name="run-wsimport">
+ <mkdir dir="${build.classes.dir}"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-wsdllocation WEB-INF/wsdl/HttpTestService.wsdl -keep -b customservice.xml -d ${build.classes.dir} HttpTestService.wsdl"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, run-wsimport, compile">
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <copy file="HttpTestService.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
+ <echo message="my build classes dir is:${build.classes.dir}" level="verbose"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="service/**,META-INF/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting localWSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -wsdllocation ${env.APS_HOME}/devtests/webservice/annotations/multiport/HttpTestService.wsdl -b customclient.xml -d ${build.classes.dir}/client HttpTestService.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="run">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="basic-wsdl-to-java-test-case"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/client/Client.java
new file mode 100644
index 0000000..8761c70
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/client/Client.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef static HttpTestService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-simple-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloPort();
+ HelloRequest req = new HelloRequest();
+ req.setString("From Vijay ");
+ HelloResponse resp = port.hello(req);
+ if(resp.getString().indexOf("From Vijay") == -1) {
+ System.out.println("Unexpected greeting " + resp.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ if(resp.getString().indexOf("Hello1") != -1) {
+ System.out.println("Unexpected greeting " + resp.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ System.out.println(resp.getString());
+ Hello1 port1 = service.getHello1Port();
+ Hello1Request req1 = new Hello1Request();
+ req1.setString("From Vijay ");
+ Hello1Response resp1 = port1.hello1(req1);
+ if(resp1.getString().indexOf("From Vijay") == -1) {
+ System.out.println("Unexpected greeting " + resp1.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ if(resp1.getString().indexOf("Hello1") == -1) {
+ System.out.println("Unexpected greeting " + resp1.getString());
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ System.out.println(resp1.getString());
+ stat.addStatus(args[0], stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(args[0], stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customclient.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customclient.xml
new file mode 100644
index 0000000..7c3372f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customclient.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="client"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="client"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customservice.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customservice.xml
new file mode 100644
index 0000000..242611b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/customservice.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<bindings wsdlLocation="HttpTestService.wsdl" xmlns="http://java.sun.com/xml/ns/jaxws">
+
+ <bindings node="ns1:definitions" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <package name="service"/>
+ </bindings>
+
+ <bindings node="ns1:definitions/ns1:types/xs:schema[@targetNamespace='http://httptestservice.org/types']"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://schemas.xmlsoap.org/wsdl/">
+ <ns2:schemaBindings xmlns:ns2="http://java.sun.com/xml/ns/jaxb">
+ <ns2:package name="service"/>
+ </ns2:schemaBindings>
+ </bindings>
+
+</bindings>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/Hello1Impl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/Hello1Impl.java
new file mode 100644
index 0000000..bf2e8d3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/Hello1Impl.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2003, 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
+ */
+
+/*
+ * %W% %E%
+ */
+
+package service;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+import javax.jws.WebService;
+
+@javax.ejb.Stateless
+@javax.jws.WebService(
+ serviceName="HttpTestService",
+ endpointInterface="service.Hello1",
+ portName="Hello1Port",
+ targetNamespace="http://httptestservice.org/wsdl",
+ wsdlLocation="META-INF/wsdl/HttpTestService.wsdl"
+)
+public class Hello1Impl implements Hello1 {
+
+ public Hello1Response hello1(Hello1Request req) {
+ System.out.println("Hello1, " + req.getString() + "!");
+ Hello1Response resp = new Hello1Response();
+ resp.setString("Hello1, " + req.getString() + "!");
+ return resp;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/HelloImpl.java
new file mode 100644
index 0000000..be1f465
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/multiport/service/HelloImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2003, 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
+ */
+
+/*
+ * %W% %E%
+ */
+
+package service;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+import javax.jws.WebService;
+
+@javax.ejb.Stateless
+@javax.jws.WebService(
+ serviceName="HttpTestService",
+ endpointInterface="service.Hello",
+ portName="HelloPort",
+ targetNamespace="http://httptestservice.org/wsdl",
+ wsdlLocation="META-INF/wsdl/HttpTestService.wsdl"
+)
+public class HelloImpl implements Hello {
+
+ public HelloResponse hello(HelloRequest req) {
+ System.out.println("Hello, " + req.getString() + "!");
+ HelloResponse resp = new HelloResponse();
+ resp.setString("Hello, " + req.getString() + "!");
+ return resp;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/client/Client.java
new file mode 100644
index 0000000..5180b5b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-nointf-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-nointf-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-nointf-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-nointf-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/nointf/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/build.xml
new file mode 100644
index 0000000..06c7acc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/client/Client.java
new file mode 100644
index 0000000..4922a0c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloEJBService;
+import endpoint.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-noname-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-noname-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-noname-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-noname-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/Hello.java
new file mode 100644
index 0000000..b8657e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/Hello.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/HelloEJB.java
new file mode 100644
index 0000000..e7b3cce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/noname/endpoint/HelloEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.Hello")
+@Stateless
+public class HelloEJB implements Hello {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/build.xml
new file mode 100644
index 0000000..06c7acc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/client/Client.java
new file mode 100644
index 0000000..4ff80da
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/client/Client.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloEJBService;
+import endpoint.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-oneway-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejb-oneway-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ for (int i=0;i<10;i++) {
+ port.sayHello("Appserver Tester !");
+ }
+ stat.addStatus("ejb-oneway-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-oneway-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/Hello.java
new file mode 100644
index 0000000..9952e92
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/Hello.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService
+public interface Hello {
+
+ @WebMethod
+ @Oneway
+ public void sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/HelloEJB.java
new file mode 100644
index 0000000..432a394
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/oneway/endpoint/HelloEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.Hello")
+@Stateless
+public class HelloEJB implements Hello {
+
+ public void sayHello(String who) {
+ System.out.println("WebSvcTest-Hello " + who);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/build.xml
new file mode 100644
index 0000000..a94fb52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/client/Client.java
new file mode 100644
index 0000000..907c3a0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/client/Client.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+@WebServiceRef(name="service/helloport", wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL", type=endpoint.HelloImpl.class, value=HelloImplService.class)
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ static HelloImpl port;
+
+ public static void main(String[] args) {
+ stat.addDescription("ws-portdependency-no-injection");
+ try {
+ Context ic = new InitialContext();
+
+ port = (HelloImpl) ic.lookup("java:comp/env/service/helloport");
+ } catch(Throwable t) {
+ t.printStackTrace();
+ System.out.println("Dependency lookup failed : " + t.getMessage());
+ stat.addStatus("ws-dependency-no-injection", stat.FAIL);
+ }
+ System.out.println("Port is " + port);
+ if (port!=null) {
+ Client client = new Client();
+ client.doTest(args);
+ }
+ stat.printSummary("ws-portdependency-no-injection");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ws-portdependency-no-injection", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ws-portdependency-no-injection", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ws-portdependency-no-injection", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portdependencynoinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/build.xml
new file mode 100644
index 0000000..d763632
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property file="${env.APS_HOME}/config.properties"/>
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="clean, private-deploy, private-run, private-undeploy, report"/>
+
+ <target name="private-deploy">
+ <antcall target="deploy"/>
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="HelloImpl"/>
+ <param name="port" value="HelloImpl"/>
+ </antcall>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/GatewayImpl.java">
+ <classpath refid="classpath"/>
+ </javac>
+ <mkdir dir="${env.APS_HOME}/build/module/classes/wsdl/wsdl"/>
+ <get src="http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL" dest="${env.APS_HOME}/build/module/classes//wsdl/wsdl/HelloImplService.wsdl"/>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/**,endpoint/**">
+ <metainf dir="${env.APS_HOME}/build/module/classes/wsdl"/>
+ </jar>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </condition>
+ <fail if="deploy_failed" message="Deployment failed"/>
+ </target>
+ <target name="private-run">
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="GatewayImpl"/>
+ <param name="port" value="GatewayImpl"/>
+ </antcall>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+ </target>
+ <target name="private-undeploy">
+ <antcall target="undeploy"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="EjbClient.jar"/>
+ </antcall>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/client/Client.java
new file mode 100644
index 0000000..9b30662
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/client/Client.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import ejb.GatewayImplService;
+import ejb.GatewayImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private final static String desc = "ws-ejb-port-field-injection";
+
+ @WebServiceRef(GatewayImplService.class)
+ static GatewayImpl port;
+
+ public static void main(String[] args) {
+ stat.addDescription(desc);
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary(desc);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ System.out.println("Method injected reference test...");
+ String ret = port.invokeMethod("Appserver Tester !");
+ if(ret.indexOf("METHOD WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ System.out.println("Field injected reference test...");
+ ret = port.invokeField("Appserver Tester !");
+ if(ret.indexOf("FIELD WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ System.out.println("Dependency jndi looup reference test...");
+ ret = port.invokeDependency("Appserver Tester !");
+ if(ret.indexOf("JNDI WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ stat.addStatus(desc, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(desc, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/ejb/GatewayImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/ejb/GatewayImpl.java
new file mode 100644
index 0000000..318023b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/ejb/GatewayImpl.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.Stateless;
+
+import javax.xml.ws.WebServiceRef;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+@WebService
+@Stateless
+//@WebServiceRef(name="service/helloservice", type=HelloImplService.class)
+@WebServiceRef(name="service/helloport", type=HelloImpl.class, value=HelloImplService.class)
+public class GatewayImpl {
+
+ @WebServiceRef(HelloImplService.class)
+ HelloImpl portField;
+
+ HelloImpl portMethod=null;
+
+ // method injection has to be private to avoid being part of the
+ // web service interface.
+ @WebServiceRef(HelloImplService.class)
+ private void setPort(HelloImpl port) {
+ portMethod = port;
+ }
+
+ @WebMethod
+ public String invokeMethod(String who) {
+ return "METHOD " + portMethod.sayHello(who);
+ }
+
+ @WebMethod
+ public String invokeField(String who) {
+ return "FIELD " + portField.sayHello(who);
+ }
+
+ @WebMethod
+ public String invokeDependency(String who) {
+ try {
+ Context ic = new InitialContext();
+// HelloImplService service = (HelloImplService) ic.lookup("java:comp/env/service/helloservice");
+// HelloImpl port = service.getPort(HelloImpl.class);
+// System.out.println("From service... " + port.sayHello(who));
+ HelloImpl port = (HelloImpl) ic.lookup("java:comp/env/service/helloport");
+ return "JNDI " + port.sayHello(who);
+ } catch(Throwable t) {
+ t.printStackTrace();
+ return "FAILED";
+ }
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portejbclient/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/build.xml
new file mode 100644
index 0000000..a94fb52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/client/Client.java
new file mode 100644
index 0000000..de53997
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/client/Client.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private final static String desc = "ws-ejb-port-field-injection";
+
+ @WebServiceRef(HelloImplService.class)
+ static HelloImpl port;
+
+ public static void main(String[] args) {
+ stat.addDescription(desc);
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary(desc);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(desc, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(desc, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portfieldinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/build.xml
new file mode 100644
index 0000000..a94fb52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/client/Client.java
new file mode 100644
index 0000000..4e7c5b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private final static String desc = "ws-ejb-port-method-injection";
+
+ @WebServiceRef(HelloImplService.class)
+ static void setPort(HelloImpl s) {
+ port = s;
+ }
+
+ static HelloImpl port;
+
+ public static void main(String[] args) {
+ stat.addDescription(desc);
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary(desc);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(desc, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(desc, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/portmethodinjection/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/build.xml
new file mode 100644
index 0000000..825066a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/build.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="clean">
+ <antcall target="test_build"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+
+ <antcall target="run"/>
+ <antcall target="undeploy"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="test_build">
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes endpoint/wsdl/HelloImplService.wsdl"/>
+ </exec>
+ <antcall target="build"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/client/Client.java
new file mode 100644
index 0000000..9543838
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.jaxws.HelloImplService;
+import endpoint.jaxws.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-provider-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("ejb-provider-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImpl();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("Simple-Annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-provider-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-provider-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/HelloImpl.java
new file mode 100644
index 0000000..0a58474
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/HelloImpl.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.*;
+import java.util.Map;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.Service ;
+import javax.xml.soap.SOAPMessage;
+import javax.ejb.Stateless;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.ws.WebServiceException;
+
+
+import endpoint.jaxws.*;
+
+@WebServiceProvider(serviceName="HelloImplService", portName="HelloImpl", targetNamespace="http://endpoint/jaxws", wsdlLocation="HelloImplService.wsdl")
+//@ServiceMode(value=Service.Mode.MESSAGE)
+@Stateless
+public class HelloImpl implements Provider<Source> {
+
+ private static final JAXBContext jaxbContext = createJAXBContext();
+ private int combo;
+ private int bodyIndex;
+
+ public javax.xml.bind.JAXBContext getJAXBContext(){
+ return jaxbContext;
+ }
+
+ private static javax.xml.bind.JAXBContext createJAXBContext(){
+ try{
+ return javax.xml.bind.JAXBContext.newInstance(ObjectFactory.class);
+ }catch(javax.xml.bind.JAXBException e){
+ throw new WebServiceException(e.getMessage(), e);
+ }
+ }
+
+
+ public Source invoke(Source request) {
+ try {
+ recvBean(request);
+ return sendBean();
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new WebServiceException("Provider endpoint failed", e);
+ }
+ }
+
+ private void recvBean(Source source) throws Exception {
+ System.out.println("**** recvBean ******");
+ System.out.println(jaxbContext.createUnmarshaller().unmarshal(source));
+ JAXBElement element = (JAXBElement) jaxbContext.createUnmarshaller().unmarshal(source);
+ System.out.println("name="+element.getName()+ " value=" + element.getValue());
+ if (element.getValue() instanceof SayHello) {
+ SayHello hello = (SayHello) element.getValue();
+ System.out.println("Say Hello from " + hello.getArg0());
+ }
+
+ }
+
+ private Source sendBean() throws Exception {
+ System.out.println("**** sendBean ******");
+ SayHelloResponse resp = new SayHelloResponse();
+ resp.setReturn("WebSvcTest-Hello");
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ ObjectFactory factory = new ObjectFactory();
+ jaxbContext.createMarshaller().marshal(factory.createSayHelloResponse(resp), bout);
+ return new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/HelloImplService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/HelloImplService.wsdl
new file mode 100644
index 0000000..23e0e8d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/HelloImplService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HelloImplService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="HelloImpl">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloImplBinding" type="tns:HelloImpl">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloImplService">
+ <port name="HelloImpl" binding="tns:HelloImplBinding">
+ <soap:address location="REPLACE_WITH_URL" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/schema1.xsd
new file mode 100644
index 0000000..f207ad7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/provider/endpoint/wsdl/schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.properties
new file mode 100644
index 0000000..47dbabd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="restful-ejb"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.xml
new file mode 100644
index 0000000..76c64d2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/build.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="restful-ejb" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ear"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <jar destfile="${build.classes.dir}/tmp/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**"/>
+ <jar destfile="${assemble.dir}/${appname}App.ear"
+ basedir="${build.classes.dir}/tmp"
+ includes="**"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ear">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="restful-ejb-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/client/Client.java
new file mode 100644
index 0000000..889daf7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/client/Client.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+import org.w3c.dom.Node;
+import java.net.URL;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamResult;
+import java.io.ByteArrayOutputStream;
+import java.util.Properties;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) throws Exception {
+ stat.addDescription("webservices-simple-restful-svc");
+ String endpointAddress =
+ "http://localhost:8080/AddNumbersImplService/endpoint.AddNumbersImpl";
+ URL url = new URL(endpointAddress+"?num1=10&num2=20");
+ System.out.println ("Invoking URL="+url);
+ process(url, args);
+ stat.printSummary("webservices-simple-restful-svc");
+ }
+
+ private static void process(URL url, String[] args) throws Exception {
+ InputStream in = url.openStream();
+ StreamSource source = new StreamSource(in);
+ printSource(source, args);
+ }
+
+ private static void printSource(Source source, String[] args) {
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ StreamResult sr = new StreamResult(bos );
+ Transformer trans = TransformerFactory.newInstance().newTransformer();
+ Properties oprops = new Properties();
+ oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ trans.setOutputProperties(oprops);
+ trans.transform(source, sr);
+ String resp = bos.toString();
+ System.out.println("**** Response ******"+resp);
+ bos.close();
+ if(resp.indexOf("<ns:return>30</ns:return>") != -1)
+ stat.addStatus(args[0], stat.PASS);
+ else
+ stat.addStatus(args[0], stat.FAIL);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..82e236e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/restful-ejb/endpoint/AddNumbersImpl.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.io.ByteArrayInputStream;
+import java.util.StringTokenizer;
+
+import javax.annotation.Resource;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.http.HTTPException;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.BindingType;
+import javax.ejb.Stateless;
+
+@WebServiceProvider
+@Stateless
+@BindingType(value=HTTPBinding.HTTP_BINDING)
+public class AddNumbersImpl implements Provider<Source> {
+
+ @Resource
+ protected WebServiceContext wsContext;
+
+ public Source invoke(Source source) {
+ try {
+ MessageContext mc = wsContext.getMessageContext();
+ String query = (String)mc.get(MessageContext.QUERY_STRING);
+ String path = (String)mc.get(MessageContext.PATH_INFO);
+ System.out.println("Query String = "+query);
+ System.out.println("PathInfo = "+path);
+ if (query != null && query.contains("num1=") &&
+ query.contains("num2=")) {
+ return createSource(query);
+ } else if (path != null && path.contains("/num1") &&
+ path.contains("/num2")) {
+ return createSource(path);
+ } else {
+ throw new HTTPException(404);
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new HTTPException(500);
+ }
+ }
+
+ private Source createSource(String str) {
+ StringTokenizer st = new StringTokenizer(str, "=&/");
+ String token = st.nextToken();
+ int number1 = Integer.parseInt(st.nextToken());
+ st.nextToken();
+ int number2 = Integer.parseInt(st.nextToken());
+ int sum = number1+number2;
+ String body =
+ "<ns:addNumbersResponse xmlns:ns=\"http://duke.org\"><ns:return>"
+ +sum
+ +"</ns:return></ns:addNumbersResponse>";
+ Source source = new StreamSource(
+ new ByteArrayInputStream(body.getBytes()));
+ return source;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/build.xml
new file mode 100644
index 0000000..526e719
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/build.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="webservice ejb security annotations" default="all" basedir=".">
+ <target name="all">
+ <ant dir="roles" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/build.xml
new file mode 100644
index 0000000..446c584
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/build.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../../annotations-common.xml">
+<!ENTITY common SYSTEM "file:./../../../../config/common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <property name="app-client-parameters" value="-xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml"/>
+ <target name="all" depends="clean">
+ <antcall target="deploy"/>
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </condition>
+ <fail message="Deployment failed" if="deploy_failed"/>
+ <echo message="Deployment passed ${deploy_succeeded}"/>
+ <echo message="ALL WEBSERVICE INVOCATION SHOULD FAIL..."/>
+ <antcall target="run">
+ <param name="app-client-extra-parameters" value="-user nouser -password nopass"/>
+ </antcall>
+ <echo message="CREATING USERS..."/>
+ <copy file="${admin.password.file}" tofile="./passwordfile" overwrite="true"/>
+ <echo file="./passwordfile" append="true">
+AS_ADMIN_USERPASSWORD=tester
+ </echo>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin">
+ <arg line="create-file-user --port ${admin.port} --user ${admin.user} --passwordfile ./passwordfile --groups webservicetester --authrealmname file webservicetester"/>
+ </exec>
+ <copy file="${admin.password.file}" tofile="./passwordfile" overwrite="true"/>
+ <echo file="./passwordfile" append="true">
+AS_ADMIN_USERPASSWORD=tester2
+ </echo>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin">
+ <arg line="create-file-user --port ${admin.port} --user ${admin.user} --passwordfile ./passwordfile --groups webservicetester2 --authrealmname file webservicetester2"/>
+ </exec>
+ <antcall target="internal-run">
+ <param name="app-client-extra-parameters" value="-user nouser -password nopass webservicetester tester"/>
+ </antcall>
+ <antcall target="internal-run">
+ <param name="app-client-extra-parameters" value="-user nouser -password nopass webservicetester2 tester2 FAILURE"/>
+ </antcall>
+ <echo message="DELETING USERS..."/>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin">
+ <arg line="delete-file-user --port ${admin.port} --user ${admin.user} --passwordfile ${admin.password.file} --authrealmname file webservicetester"/>
+ </exec>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin">
+ <arg line="delete-file-user --port ${admin.port} --user ${admin.user} --passwordfile ${admin.password.file} --authrealmname file webservicetester2"/>
+ </exec>
+ <antcall target="undeploy"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/client/Client.java
new file mode 100644
index 0000000..9e78167
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/client/Client.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.util.Map;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ String username=null;
+ String password=null;
+ boolean successExpected=true;
+ String description;
+ if (args.length>1) {
+ username=args[0];
+ password=args[1];
+ description="webservices-ejb-rolesAllowed-annotation-positive";
+ if (args.length>2) {
+ description="webservices-ejb-rolesAllowed-annotation-negative-2";
+ successExpected = !(args[2].equalsIgnoreCase("FAILURE"));
+ }
+ } else {
+ successExpected = false;
+ description="webservices-ejb-rolesAllowed-annotation-negative";
+ }
+ stat.addDescription(description);
+ Client client = new Client();
+ client.doTest(description, username, password, successExpected);
+ stat.printSummary(description);
+ }
+
+ public void doTest(String desc, String username, String password, boolean successExpected) {
+
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ if (username!=null && password!=null) {
+ BindingProvider bd = (BindingProvider) port;
+ Map<String, Object> requestContext = bd.getRequestContext();
+ requestContext.put("javax.xml.ws.security.auth.username",username);
+ requestContext.put("javax.xml.ws.security.auth.password",password);
+ }
+
+ // @PermitAll invocation, it should always work
+ try {
+ String ret = port.permitAll("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("@PermitAll method invocation passed - good...");
+ } catch(Exception e) {
+ if (successExpected) {
+ System.out.println("@PermitAll method invocation failed - TEST FAILED");
+ stat.addStatus(desc, stat.FAIL);
+ } else {
+ System.out.println("@PermitAll method invocation failed - good...");
+ }
+ }
+
+ // @DenyAll invocation, it should always faile
+ try {
+ String ret = port.denyAll("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") != -1) {
+ System.out.println("@DenyAll Method invocation succeeded, should have failed - TEST FAILED ");
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ } catch(Exception e) {
+ System.out.println("@DenyAll method invocation failed - good...");
+ }
+
+ // role based invocation
+ String ret = port.roleBased("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ if (successExpected)
+ stat.addStatus(desc, stat.PASS);
+ else
+ stat.addStatus(desc, stat.FAIL);
+
+ } catch(Throwable t) {
+ if (successExpected) {
+ t.printStackTrace();
+ stat.addStatus(desc, stat.FAIL);
+ } else {
+ System.out.println("Got expected failure " + t.getMessage());
+ stat.addStatus(desc, stat.PASS);
+ }
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/HelloImpl.java
new file mode 100644
index 0000000..e086057
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/HelloImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.security.RolesAllowed;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ @RolesAllowed(value={"webservicetester"})
+ public String roleBased(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+
+ @DenyAll
+ public String denyAll(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+
+ @PermitAll
+ public String permitAll(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/sun-ejb-jar.xml
new file mode 100644
index 0000000..d9ae964
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/security/roles/endpoint/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <security-role-mapping>
+ <role-name>webservicetester</role-name>
+ <principal-name>webservicetester</principal-name>
+ </security-role-mapping>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>HelloImpl</ejb-name>
+ <webservice-endpoint>
+ <port-component-name>HelloImpl</port-component-name>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/build.xml
new file mode 100644
index 0000000..d763632
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="methodinjection" default="core" basedir=".">
+
+ &commonBuild;
+ <property file="${env.APS_HOME}/config.properties"/>
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="clean, private-deploy, private-run, private-undeploy, report"/>
+
+ <target name="private-deploy">
+ <antcall target="deploy"/>
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="HelloImpl"/>
+ <param name="port" value="HelloImpl"/>
+ </antcall>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/GatewayImpl.java">
+ <classpath refid="classpath"/>
+ </javac>
+ <mkdir dir="${env.APS_HOME}/build/module/classes/wsdl/wsdl"/>
+ <get src="http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL" dest="${env.APS_HOME}/build/module/classes//wsdl/wsdl/HelloImplService.wsdl"/>
+ <jar destfile="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="ejb/**,endpoint/**">
+ <metainf dir="${env.APS_HOME}/build/module/classes/wsdl"/>
+ </jar>
+ <waitfor maxwait="100" maxwaitunit="second">
+ <or>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </or>
+ </waitfor>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/EjbClient.jar_deployFailed"/>
+ </condition>
+ <fail if="deploy_failed" message="Deployment failed"/>
+ </target>
+ <target name="private-run">
+ <basename file="${client-src-name}" property="client" suffix=".java"/>
+ <dirname file="${client-src-name}" property="client-directory"/>
+ <basename file="${client-directory}" property="client-pkg-name"/>
+ <property name="client-class-name" value="${client-pkg-name}/${client}.class"/>
+ <antcall target="clean"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="GatewayImpl"/>
+ <param name="port" value="GatewayImpl"/>
+ </antcall>
+ <antcall target="compile-client"/>
+ <echo message="Running appclient with ${client-pkg-name}.${client}"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg value="${client-pkg-name}.${client}"/>
+ </exec>
+ </target>
+ <target name="private-undeploy">
+ <antcall target="undeploy"/>
+ <antcall target="autoundeploy-file">
+ <param name="filename" value="EjbClient.jar"/>
+ </antcall>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/client/Client.java
new file mode 100644
index 0000000..02332e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/client/Client.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import ejb.GatewayImplService;
+import ejb.GatewayImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private final static String desc = "ws-ejb-sevice-field-injection";
+
+ @WebServiceRef(GatewayImplService.class)
+ static GatewayImpl port;
+
+ public static void main(String[] args) {
+ stat.addDescription(desc);
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary(desc);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ System.out.println("Method injected reference test...");
+ String ret = port.invokeMethod("Appserver Tester !");
+ if(ret.indexOf("METHOD WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ System.out.println("Field injected reference test...");
+ ret = port.invokeField("Appserver Tester !");
+ if(ret.indexOf("FIELD WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ System.out.println("Dependency jndi looup reference test...");
+ ret = port.invokeDependency("Appserver Tester !");
+ if(ret.indexOf("JNDI WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("Server returned " + ret + " : PASSED");
+ stat.addStatus(desc, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(desc, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/ejb/GatewayImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/ejb/GatewayImpl.java
new file mode 100644
index 0000000..e94c4b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/ejb/GatewayImpl.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.Stateless;
+
+import javax.xml.ws.WebServiceRef;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+@WebService
+@Stateless
+@WebServiceRef(name="service/helloservice", type=HelloImplService.class)
+public class GatewayImpl {
+
+ @WebServiceRef
+ HelloImplService serviceField;
+
+ HelloImplService serviceMethod=null;
+
+ // method injection has to be private to avoid being part of the
+ // web service interface.
+ @WebServiceRef()
+ private void setService(HelloImplService service) {
+ serviceMethod = service;
+ }
+
+ @WebMethod
+ public String invokeMethod(String who) {
+ HelloImpl port = serviceMethod.getPort(HelloImpl.class);
+ return "METHOD " + port.sayHello(who);
+ }
+
+ @WebMethod
+ public String invokeField(String who) {
+ HelloImpl port = serviceField.getPort(HelloImpl.class);
+ return "FIELD " + port.sayHello(who);
+ }
+
+ @WebMethod
+ public String invokeDependency(String who) {
+ String result = null;
+ try {
+ Context ic = new InitialContext();
+ HelloImplService service = (HelloImplService) ic.lookup("java:comp/env/service/helloservice");
+ HelloImpl port = service.getPort(HelloImpl.class);
+ result = "JNDI " + port.sayHello(who);
+ System.out.println(result);
+ } catch(Throwable t) {
+ t.printStackTrace();
+ return "FAILED";
+ }
+ return result;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/endpoint/HelloImpl.java
new file mode 100644
index 0000000..dbb9d69
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/serviceejbclient/endpoint/HelloImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/client/Client.java
new file mode 100644
index 0000000..b358abf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-sessionctx");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-sessionctx");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello ANONYMOUS") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ejb-sessionctx", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-sessionctx", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-sessionctx", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/endpoint/HelloImpl.java
new file mode 100644
index 0000000..f4e5705
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/sessionctx/endpoint/HelloImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+import javax.ejb.SessionContext;
+import java.security.Principal;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ @Resource SessionContext ejbsc;
+
+ public String sayHello(String who) {
+ System.out.println("EJB WSCTXT wsc = " + ejbsc);
+ if(ejbsc != null)
+ return "WebSvcTest-Hello " + ejbsc.getCallerPrincipal();
+ return "EJB WebServiceContext injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.properties
new file mode 100644
index 0000000..11e4d4e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="singleton"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.xml
new file mode 100644
index 0000000..f029ea3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="singleton" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ear"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="outsidepkg"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/lib"/>
+ <jar destfile="${build.classes.dir}/tmp/lib/mylib.jar"
+ basedir="${build.classes.dir}"
+ includes="outsidepkg/**"/>
+ <jar destfile="${build.classes.dir}/tmp/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**"/>
+ <jar destfile="${assemble.dir}/${appname}App.ear"
+ basedir="${build.classes.dir}/tmp"
+ includes="**"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -Xendorsed -d ${build.classes.dir}/client http://${http.host}:${http.port}/HelloImplService/HelloImpl?WSDL"/>
+ </antcall>
+ <javac verbose="true" srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/modules/webservices-osgi.jar:${env.S1AS_HOME}/modules/webservices-api-osgi.jar:${env.S1AS_HOME}/modules/jaxb-osgi.jar:${env.S1AS_HOME}/modules/jaxb-api-osgi.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ear">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="restart-test">
+ <antcall target="restart-server-instance-common"/>
+ <antcall target="runclient"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="ejb-singleton-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/client/Client.java
new file mode 100644
index 0000000..ad49e70
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ //@WebServiceRef
+ // static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("ejb-singleton-service");
+ Client client = new Client();
+ client.doSyncTest();
+ stat.printSummary("ejb-singleton-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ HelloImplService service = new HelloImplService();
+ HelloImpl port = service.getHelloImplPort();
+ RetVal ret = port.sayHello("Hi Singleton");
+ if(ret.getRetVal().indexOf("Sing") == -1) {
+ System.out.println("WRONG GREETING " + ret.getRetVal());
+ stat.addStatus("ejb-singleton-service-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ System.out.println(ret.getRetVal());
+ stat.addStatus("ejb-singleton-service-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-singleton-service-test", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/endpoint/HelloImpl.java
new file mode 100644
index 0000000..5887e9c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/endpoint/HelloImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Singleton;
+import outsidepkg.RetVal;
+
+@WebService
+@Singleton
+public class HelloImpl {
+
+ public RetVal sayHello(String who) {
+ return new RetVal("WebSvcTest-Hello " + who);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/outsidepkg/RetVal.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/outsidepkg/RetVal.java
new file mode 100644
index 0000000..61cae05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/singleton/outsidepkg/RetVal.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 outsidepkg;
+
+public class RetVal {
+ private String value;
+ public RetVal() {}
+ public RetVal(String s) {this.value = s;}
+ public String getRetVal() {return this.value;}
+ public void setRetVal(String s) {this.value=s;}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/build.xml
new file mode 100644
index 0000000..06c7acc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/client/Client.java
new file mode 100644
index 0000000..4f40d11
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloEJBService;
+import endpoint.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ // @WebServiceRef
+ //static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("handler-chain-annotation");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("handler-chain-annotation");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port =new HelloEJBService().getHelloEJBPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello injectedValue") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("handler-chain-annotation", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("handler-chain-annotation", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("handler-chain-annotation", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/Hello.java
new file mode 100644
index 0000000..b8657e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/Hello.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/HelloEJB.java
new file mode 100644
index 0000000..c447846
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/HelloEJB.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.Hello")
+@Stateless
+@javax.jws.HandlerChain(name="some name", file="META-INF/myhandler.xml")
+public class HelloEJB implements Hello {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/TestHandler.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/TestHandler.java
new file mode 100644
index 0000000..41508fb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/TestHandler.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+import javax.annotation.PostConstruct;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.soap.*;
+
+public class TestHandler implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ return null;
+ }
+
+ String postConstString = "NOT_INITIALIZED";
+ @PostConstruct
+ public void init() {
+ postConstString = "PROPERLY_INITIALIZED";
+ }
+
+ @Resource(name="stringValue")
+ String injectedString = "undefined";
+
+ public boolean handleMessage(SOAPMessageContext context) {
+ try {
+ if ("PROPERLY_INITIALIZED".equals(postConstString)) {
+ System.out.println("postConstString = " + postConstString);
+ } else {
+ System.out.println("Handler PostConstruct not called property");
+ System.out.println("postConstString = " + postConstString);
+ return false;
+ }
+ if ("undefined".equals(injectedString)) {
+ System.out.println("Handler not injected property");
+ return false;
+ } else {
+ System.out.println("injectedString = " + injectedString);
+ }
+ SOAPMessageContext smc = (SOAPMessageContext) context;
+ SOAPMessage message = smc.getMessage();
+ SOAPBody body = message.getSOAPBody();
+
+ SOAPElement paramElement =
+ (SOAPElement) body.getFirstChild().getFirstChild();
+ paramElement.setValue(injectedString + " " + paramElement.getValue());
+ } catch (SOAPException e) {
+ e.printStackTrace();
+ }
+ System.out.println("VIJ's TEST HANDLER CALLED");
+ return true;
+ }
+
+ public boolean handleFault(SOAPMessageContext context) {
+ return true;
+ }
+
+ public void destroy() {}
+
+ public void close(MessageContext context) {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/ejb-jar.xml
new file mode 100644
index 0000000..92f0a2b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/ejb-jar.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="false" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+<enterprise-beans>
+<session>
+<display-name>HelloEJB</display-name>
+<ejb-name>HelloEJB</ejb-name>
+<business-local>endpoint.Hello</business-local>
+<service-endpoint>endpoint.Hello</service-endpoint>
+<ejb-class>endpoint.HelloEJB</ejb-class>
+<session-type>Stateless</session-type>
+<transaction-type>Container</transaction-type>
+<env-entry>
+ <env-entry-name>stringValue</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>injectedValue</env-entry-value>
+</env-entry>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</session>
+</enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/myhandler.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/myhandler.xml
new file mode 100644
index 0000000..9b79e5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/svchandler/endpoint/myhandler.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-class>endpoint.TestHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/README b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/README
new file mode 100644
index 0000000..333179e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/README
@@ -0,0 +1,2 @@
+
+This tests for clients with @WebserviceRefs and other annotations like MTOM, etc
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.properties
new file mode 100644
index 0000000..2e76a39
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="wsRef-webservice-features"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.xml
new file mode 100644
index 0000000..8797c23
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/build.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="wsRef-webservicefeatures" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+
+ <path id="classpath">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="bootclasspath">
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <target name="all" depends="clean, setup, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client,runtest1"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="runtest1" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsejbclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/HelloService/Hello?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="classpath"/>
+ <compilerarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/modules/endorsed"/>
+ </javac>
+
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <jar destfile="${assemble.dir}/wsejbclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsejbclient.war"/>
+ <echo message="Deploying wsclient.war from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsejbclient"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client-web.xml
new file mode 100644
index 0000000..027dfce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client/TestClient.java
new file mode 100644
index 0000000..ffd76f5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("WSREF-features");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("WSREF-features");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF HELLO SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("WSREF-features", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("WSREF-features", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/endpoint/Hello.java
new file mode 100644
index 0000000..c4edf73
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/endpoint/Hello.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@javax.ejb.Stateless
+@WebService(
+ name="Hello",
+ serviceName="HelloService",
+ targetNamespace="http://example.com/Hello"
+)
+public class Hello {
+ public Hello() {}
+
+ @WebMethod(operationName="sayHello", action="urn:SayHello")
+ public String sayHello(String who) {
+ return "Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/web.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/web.xml
new file mode 100644
index 0000000..aae527e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/webclient/Client.java
new file mode 100644
index 0000000..b6aa70c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsRef-webservice-features/webclient/Client.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import javax.xml.ws.soap.*;
+
+public class Client extends HttpServlet {
+
+ @javax.xml.ws.WebServiceRef(HelloService.class)
+ @MTOM(enabled=true)
+ @RespectBinding
+ @Addressing (required = false,enabled=true)
+
+ Hello hiport;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true;
+ String ret = hiport.sayHello("All");
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF HELLO SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/build.xml
new file mode 100644
index 0000000..30494f7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/client/Client.java
new file mode 100644
index 0000000..54380b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef(wsdlLocation="http://HTTP_HOST:HTTP_PORT/HelloImplService/HelloImpl?WSDL")
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-ejb-wsctxt");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-ejb-wsctxt");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ HelloImpl port = service.getHelloImplPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("ejb-wsctxt", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus("ejb-wsctxt", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("ejb-wsctxt", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/endpoint/HelloImpl.java
new file mode 100644
index 0000000..c351006
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxt/endpoint/HelloImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+import javax.ejb.SessionContext;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ @Resource WebServiceContext ejbsc;
+//@Resource SessionContext sc;
+
+
+ public String sayHello(String who) {
+ System.out.println("EJB WSCTXT wsc = " + ejbsc);
+ if(ejbsc != null) {
+System.out.println(ejbsc.getMessageContext());
+if (ejbsc.getMessageContext() instanceof javax.xml.ws.handler.MessageContext){
+System.out.println("YYYYY" +ejbsc.getMessageContext().getClass());
+}
+else {
+System.out.println("NNN " + ejbsc.getMessageContext().getClass());
+
+}
+ return "WebSvcTest-Hello " + who;
+ }
+/* if(sc != null) {
+System.out.println(sc.getContextData().getClass());
+System.out.println(sc.getContextData());
+
+}*/
+ return "EJB WebServiceContext injection failed";
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/build.xml
new file mode 100644
index 0000000..06c7acc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/build.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonBuild SYSTEM "file:./../annotations-common.xml">
+]>
+
+<project name="Hello" default="core" basedir=".">
+
+ &commonBuild;
+ <property name="src-name" value="endpoint/HelloEJB.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <target name="all" depends="test-all"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/client/Client.java
new file mode 100644
index 0000000..0e49e37
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/client/Client.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.HelloEJBService;
+import endpoint.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("wsctxt-invocationhandlerctxt");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("wsctxt-invocationhandlerctxt");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("1234") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("wsctxt-invocationhandlerctxt", stat.FAIL);
+ return;
+ }
+ if(ret.indexOf("45") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("wsctxt-invocationhandlerctxt", stat.FAIL);
+ return;
+ }
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus("wsctxt-invocationhandlerctxt", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("wsctxt-invocationhandlerctxt", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("wsctxt-invocationhandlerctxt", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/Hello.java
new file mode 100644
index 0000000..b8657e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/Hello.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+@WebService
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/HelloEJB.java
new file mode 100644
index 0000000..0b9a462
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/HelloEJB.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+import javax.annotation.Resource;
+import javax.xml.ws.WebServiceContext;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+@WebService(endpointInterface="endpoint.Hello")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource WebServiceContext wsc;
+
+ public String sayHello(String who) {
+ Map<String, Object> msgCtxt = wsc.getMessageContext();
+ return msgCtxt.get("intVal") + "WebSvcTest-Hello " + who + msgCtxt.get("longVal");
+ }
+
+ @AroundInvoke
+ private Object interceptBusinessMethod(InvocationContext invCtx) {
+ try {
+ Map<String, Object> map = invCtx.getContextData();
+ map.put("intVal", new Integer(45));
+ map.put("longVal", new Long(1234));
+ return invCtx.proceed();
+ } catch(Throwable t) {}
+ return null;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/ejb-jar.xml
new file mode 100644
index 0000000..25844af
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsctxtinterceptor/endpoint/ejb-jar.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="false" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+<enterprise-beans>
+<session>
+<display-name>HelloEJB</display-name>
+<ejb-name>HelloEJB</ejb-name>
+<business-local>endpoint.Hello</business-local>
+<service-endpoint>endpoint.Hello</service-endpoint>
+<ejb-class>endpoint.HelloEJB</ejb-class>
+<session-type>Stateless</session-type>
+<transaction-type>Container</transaction-type>
+<security-identity>
+<use-caller-identity/>
+</security-identity>
+</session>
+</enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.properties b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.properties
new file mode 100644
index 0000000..500709c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.properties
@@ -0,0 +1,22 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="wsnameejbname"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.xml b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.xml
new file mode 100644
index 0000000..d81e8f4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/build.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="wsnameejbname" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ <antcall target="pkg-ejb-jar">
+ <param name="jar.classes" value="endpoint"/>
+ <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/AddNumbersImplService/ThisShouldBeIgnored?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/AddNumbersImplService/ThisShouldBeIgnored?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ejb-jar">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="client.Client"/>
+ <param name="other-args" value="wsname-ejbname-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/client/Client.java
new file mode 100644
index 0000000..97d19bd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/client/Client.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.rmi.RemoteException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import endpoint.*;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("wsname-ejbname-service");
+ Client client = new Client();
+ client.doSyncTest();
+ stat.printSummary("wsname-ejbname-service");
+ }
+
+ public void doSyncTest() {
+ try {
+ ThisShouldBeIgnored port = service.getThisShouldBeIgnoredPort();
+ int ret = port.addNumbers(2222, 1234);
+ if(ret!=(2222+1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("wsname-ejbname-service-test", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("wsname-ejbname-service-test", stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus("wsname-ejbname-service-test", stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..49ee427
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ejb_annotations/wsnameejbname/endpoint/AddNumbersImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(name="ThisShouldBeIgnored")
+@Stateless
+public class AddNumbersImpl {
+ public int addNumbers(int n1, int n2) {
+ System.out.println ("Received ejb add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/build.xml b/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/build.xml
new file mode 100644
index 0000000..318ded3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/build.xml
@@ -0,0 +1,52 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+]>
+
+<project name="Filter URL handling test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+
+ <target name="all" depends="clean, compile, run "/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <java classname="client.Client">
+ <arg value="http://${http.host}:${http.port}/"/>
+ <classpath>
+ <pathelement path="${build.classes.dir}"/>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="clean">
+ <antcall target="clean-common"/>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/client/Client.java
new file mode 100644
index 0000000..9352f74
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/filter_urlhandling/client/Client.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2002, 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 client;
+
+import java.net.URL;
+import java.net.HttpURLConnection;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.Iterator;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+/**
+ *
+ * @author dochez
+ */
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-filter-url-handling");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-filter-url-handling");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ String webURL = args[0];
+ URL url = new URL(args[0] + "//");
+ System.out.println("Invoking " + url.toExternalForm());
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.connect();
+ int responseCode = connection.getResponseCode();
+ System.out.println("Response code " + connection.getResponseCode());
+ if (HttpURLConnection.HTTP_NOT_FOUND == responseCode) {
+ // passed
+ System.out.println("Passed, page is not found");
+ stat.addStatus("webservice filter url handling", stat.PASS);
+ return;
+ }
+ if (HttpURLConnection.HTTP_INTERNAL_ERROR == responseCode) {
+ // server not started
+ System.out.println("Error, server is down ?");
+ stat.addStatus("webservice filter url handling", stat.FAIL);
+ return;
+ }
+ if (HttpURLConnection.HTTP_OK == responseCode) {
+ // failed
+ System.out.println("Got a page back, check it is a valid one...");
+ int length = connection.getContentLength();
+ System.out.println("Content-length " + length);
+ if (length==-1) {
+ stat.addStatus("webservice filter url handling", stat.FAIL);
+ } else {
+ stat.addStatus("webservice filter url handling", stat.PASS);
+ }
+ stat.addStatus("webservice filter url handling", stat.FAIL);
+ } else {
+ System.out.println("ERROR - Unknow return code " + responseCode);
+ Map map = connection.getHeaderFields();
+ for (Iterator itr=map.keySet().iterator();itr.hasNext();) {
+ String header = (String) itr.next();
+ System.out.println("Header " + header + "-->" + map.get(header));
+ }
+ stat.addStatus("webservice filter url handling", stat.FAIL);
+ }
+ } catch(Exception e) {
+ System.out.println("Errror - exception " + e.getMessage());
+ stat.addStatus("webservice filter url handling", stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.properties b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.properties
new file mode 100644
index 0000000..c4f85ea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="service_endpoint_address"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.wsit.descriptors" value="./descriptors"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.xml b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.xml
new file mode 100644
index 0000000..d86190e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/build.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="endpoint_address_uri" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/service?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -p gf_dd.endpoint_address_uri.client -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/service?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpathref="classpath"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="gf_dd.endpoint_address_uri.client.Client"/>
+ <param name="other-args" value="gf_dd-endpoint_address_uri-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/client/Client.java
new file mode 100644
index 0000000..9d2cca5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/client/Client.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2017, 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 gf_dd.endpoint_address_uri.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.ws.WebServiceRef;
+
+/**
+ * @author Rama Pulavarthi
+ */
+public class Client {
+
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter("appserv-tests");
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("gf_dd.endpoint_address_uri");
+ Client client = new Client();
+ client.runTest();
+ stat.printSummary("gf_dd.endpoint_address_uri");
+ }
+
+ public void runTest() {
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ int ret = port.addNumbers(4321, 1234);
+ if (ret != (4321 + 1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("gf_dd.endpoint_address_uri", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("gf_dd.endpoint_address_uri", stat.PASS);
+ } catch (Exception e) {
+ e.printStackTrace();
+ stat.addStatus("gf_dd.endpoint_address_uri", stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/descriptors/glassfish-web.xml b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/descriptors/glassfish-web.xml
new file mode 100644
index 0000000..f4f97be
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/descriptors/glassfish-web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<glassfish-web-app error-url="">
+ <servlet>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <webservice-endpoint>
+ <port-component-name>AddNumbersImpl</port-component-name>
+ <endpoint-address-uri>service</endpoint-address-uri>
+ <debugging-enabled>true</debugging-enabled>
+ </webservice-endpoint>
+ </servlet>
+ <class-loader delegate="true"/>
+ <jsp-config>
+ <property name="keepgenerated" value="true">
+ <description>Keep a copy of the generated servlet class' java code.</description>
+ </property>
+ </jsp-config>
+</glassfish-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..fde3084
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/gf_dd/endpoint_address_uri/endpoint/AddNumbersImpl.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+
+/**
+ * @author Lukas Jungmann
+ */
+@WebService
+public class AddNumbersImpl {
+
+ public int addNumbers(int n1, int n2) {
+ System.out.println("Received add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/GoogleSearch.wsdl b/appserver/tests/appserv-tests/devtests/webservice/google/GoogleSearch.wsdl
new file mode 100644
index 0000000..b544220
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/GoogleSearch.wsdl
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- WSDL description of the Google Web APIs.
+ The Google Web APIs are in beta release. All interfaces are subject to
+ change as we refine and extend our APIs. Please see the terms of use
+ for more information. -->
+
+<definitions name="urn:GoogleSearch"
+ targetNamespace="urn:GoogleSearch"
+ xmlns:typens="urn:GoogleSearch"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <!-- Types for search - result elements, directory categories -->
+
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:GoogleSearch">
+
+ <xsd:complexType name="GoogleSearchResult">
+ <xsd:all>
+ <xsd:element name="documentFiltering" type="xsd:boolean"/>
+ <xsd:element name="searchComments" type="xsd:string"/>
+ <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
+ <xsd:element name="estimateIsExact" type="xsd:boolean"/>
+ <xsd:element name="resultElements" type="typens:ResultElementArray"/>
+ <xsd:element name="searchQuery" type="xsd:string"/>
+ <xsd:element name="startIndex" type="xsd:int"/>
+ <xsd:element name="endIndex" type="xsd:int"/>
+ <xsd:element name="searchTips" type="xsd:string"/>
+ <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
+ <xsd:element name="searchTime" type="xsd:double"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElement">
+ <xsd:all>
+ <xsd:element name="summary" type="xsd:string"/>
+ <xsd:element name="URL" type="xsd:string"/>
+ <xsd:element name="snippet" type="xsd:string"/>
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="cachedSize" type="xsd:string"/>
+ <xsd:element name="relatedInformationPresent" type="xsd:boolean"/>
+ <xsd:element name="hostName" type="xsd:string"/>
+ <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/>
+ <xsd:element name="directoryTitle" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElementArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategoryArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategory">
+ <xsd:all>
+ <xsd:element name="fullViewableName" type="xsd:string"/>
+ <xsd:element name="specialEncoding" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <!-- Messages for Google Web APIs - cached page, search, spelling. -->
+
+ <message name="doGetCachedPage">
+ <part name="key" type="xsd:string"/>
+ <part name="url" type="xsd:string"/>
+ </message>
+
+ <message name="doGetCachedPageResponse">
+ <part name="return" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="doSpellingSuggestion">
+ <part name="key" type="xsd:string"/>
+ <part name="phrase" type="xsd:string"/>
+ </message>
+
+ <message name="doSpellingSuggestionResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearch">
+ <part name="key" type="xsd:string"/>
+ <part name="q" type="xsd:string"/>
+ <part name="start" type="xsd:int"/>
+ <part name="maxResults" type="xsd:int"/>
+ <part name="filter" type="xsd:boolean"/>
+ <part name="restrict" type="xsd:string"/>
+ <part name="safeSearch" type="xsd:boolean"/>
+ <part name="lr" type="xsd:string"/>
+ <part name="ie" type="xsd:string"/>
+ <part name="oe" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearchResponse">
+ <part name="return" type="typens:GoogleSearchResult"/>
+ </message>
+
+ <!-- Port for Google Web APIs, "GoogleSearch" -->
+
+ <portType name="GoogleSearchPort">
+
+ <operation name="doGetCachedPage">
+ <input message="typens:doGetCachedPage"/>
+ <output message="typens:doGetCachedPageResponse"/>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <input message="typens:doSpellingSuggestion"/>
+ <output message="typens:doSpellingSuggestionResponse"/>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <input message="typens:doGoogleSearch"/>
+ <output message="typens:doGoogleSearchResponse"/>
+ </operation>
+
+ </portType>
+
+
+ <!-- Binding for Google Web APIs - RPC, SOAP over HTTP -->
+
+ <binding name="GoogleSearchBinding" type="typens:GoogleSearchPort">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <operation name="doGetCachedPage">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+ </binding>
+
+ <!-- Endpoint for Google Web APIs -->
+ <service name="GoogleSearchService">
+ <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding">
+ <soap:address location="dummy"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/README b/appserver/tests/appserv-tests/devtests/webservice/google/README
new file mode 100644
index 0000000..1129dcf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/README
@@ -0,0 +1,3 @@
+This test uses a J2EE application client to access Google's Beta
+web service called GoogleSearch. It also includes an implementation
+of the web service in an ejb.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/build.properties b/appserver/tests/appserv-tests/devtests/webservice/google/build.properties
new file mode 100644
index 0000000..6eb75c3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="google"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/build.xml b/appserver/tests/appserv-tests/devtests/webservice/google/build.xml
new file mode 100644
index 0000000..ad7fd49
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/build.xml
@@ -0,0 +1,180 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="google test" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="mejbclient"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-appclient"/>
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="wscompile-ejb"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/google">
+ <fileset dir="output/google"
+ includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchService.class, GoogleSearchPort.class, ResultElement.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_ejb.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/googleejb">
+ <fileset dir="output/googleejb"
+ includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchPort.class, ResultElement.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="GoogleMapping_appclient.xml"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="GoogleMapping_appclient.xml,META-INF/wsdl/**,google/*.class" />
+
+ </antcall>
+ <copy todir="${build.classes.dir}"
+ file="GoogleMapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="GoogleMapping_ejb.xml,META-INF/wsdl/**,googleejb/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="build-mejb" depends="init-common, compile">
+ <copy file="mejbclient/application-client.xml" tofile="${build.classes.dir}/META-INF/application-client.xml"/>
+ <copy file="mejbclient/sun-application-client.xml" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/mejbclient.jar" manifest="mejbclient/MANIFEST.MF">
+ <fileset dir="${build.classes.dir}"
+ includes="google/MEJBClient.class META-INF/application-client.xml META-INF/sun-application-client.xml"
+ />
+ </jar>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="google"/>
+ <delete dir="googleejb"/>
+ <delete file="GoogleMapping_ejb.xml"/>
+ <delete file="GoogleMapping_appclient.xml"/>
+ <delete file="jaxrpc.log"/>
+ </target>
+
+ <target name="run-mejbclient" depends="init-common">
+ <exec executable="${APPCLIENT}" failonerror="true">
+ <arg line="-client ${assemble.dir}/mejbclient.jar"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="spellng http://${http.host}:${http.port}/googleejb/GoogleSearch"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="contactgoogle">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="spellng"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-appclient" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping GoogleMapping_appclient.xml wscompile_config_appclient.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping GoogleMapping_ejb.xml wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ ant contactgoogle (Executes the appclient contacting the Google.com WebServices)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/google/client/Client.java
new file mode 100644
index 0000000..bd8c242
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/client/Client.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2002, 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 google;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private String googleKey;
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-google");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-googleID");
+ }
+
+ public void doTest(String[] args) {
+ String word = (args.length == 0) ?
+ "spellng" : args[0];
+ String targetEndpointAddress = (args.length == 2) ?
+ args[1] : "http://api.google.com/search/beta2";
+
+ try {
+ Context ic = new InitialContext();
+
+
+ String googleKey = (String) ic.lookup("java:comp/env/googlekey");
+ GoogleSearchService googleSearchService =
+ (GoogleSearchService) ic.lookup("java:comp/env/service/GoogleSearch");
+ GoogleSearchPort googlePort =
+ googleSearchService.getGoogleSearchPort();
+
+ ((Stub)googlePort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+ System.out.println("Contacting google for a spelling suggestion at " + targetEndpointAddress);
+ String spellingSuggestion =
+ googlePort.doSpellingSuggestion(googleKey, word);
+ System.out.println("Gave google the word '" + word + "' ... " +
+ " and the suggested spelling is '" +
+ spellingSuggestion + "'");
+
+ stat.addStatus("googleclient main", stat.PASS);
+
+ } catch (Exception ex) {
+ System.out.println("google client test failed");
+ ex.printStackTrace();
+ stat.addStatus("googleclient main" , stat.FAIL);
+ //System.exit(15);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/google/client/MANIFEST.MF
new file mode 100644
index 0000000..bbc5dde
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: google.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application-client.xml
new file mode 100644
index 0000000..94cf733
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application-client.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my google app client</description>
+ <display-name>googleClient</display-name>
+ <env-entry>
+ <env-entry-name>googlekey</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>vCkqMIpV1WMKIRpNa7gBiYQZxDUYOYOj</env-entry-value>
+ </env-entry>
+ <service-ref>
+ <description>google service ref</description>
+ <service-ref-name>service/GoogleSearch</service-ref-name>
+ <service-interface>google.GoogleSearchService</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_appclient.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:GoogleSearch">servicens:GoogleSearchService
+ </service-qname>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application.xml
new file mode 100644
index 0000000..f8709ba
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>GoogleApp</display-name>
+ <module>
+ <java>google-client.jar</java>
+ </module>
+ <module>
+ <ejb>google-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..1ffa802
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>GoogleEjb</ejb-name>
+ <service-endpoint>googleejb.GoogleSearchPort</service-endpoint>
+ <ejb-class>googleejb.GoogleEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>GoogleEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..6b916e1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/GoogleSearch</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>google.GoogleSearchPort</service-endpoint-interface>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:GoogleSearch</namespaceURI>
+ <localpart>GoogleSearchService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..50713e3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>GoogleEjb</ejb-name>
+ <jndi-name>GoogleEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>GoogleSearchPort</port-component-name>
+ <endpoint-address-uri>googleejb/GoogleSearch</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/webservices.xml
new file mode 100644
index 0000000..8625fc6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/descriptor/webservices.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>GoogleServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>GoogleSearchPort</port-component-name>
+ <wsdl-port xmlns:googlens="urn:GoogleSearch">googlens:GoogleSearchPort</wsdl-port>
+ <service-endpoint-interface>googleejb.GoogleSearchPort
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>GoogleEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/ejb/GoogleEJB.java b/appserver/tests/appserv-tests/devtests/webservice/google/ejb/GoogleEJB.java
new file mode 100644
index 0000000..d9be7b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/ejb/GoogleEJB.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002, 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 googleejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+import javax.xml.rpc.handler.MessageContext;
+import java.security.Principal;
+
+public class GoogleEJB implements SessionBean {
+ private SessionContext sc;
+
+ public GoogleEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In GoogleEJB::ejbCreate !!");
+ }
+
+ public byte[] doGetCachedPage(java.lang.String key, java.lang.String url)
+ {
+ return null;
+ }
+
+ public String doSpellingSuggestion(java.lang.String key,
+ java.lang.String phrase)
+ {
+
+ try {
+ Principal p = sc.getCallerPrincipal();
+ if( p != null ) {
+ System.out.println("getCallerPrincipal() was successful");
+ } else {
+ throw new EJBException("getCallerPrincipal() returned null");
+ }
+ } catch(Exception e) {
+ EJBException ejbEx = new EJBException("getCallerPrincipal exception");
+ ejbEx.initCause(e);
+ throw ejbEx;
+ }
+
+ MessageContext msgContext = sc.getMessageContext();
+ System.out.println("msgContext = " + msgContext);
+
+ System.out.println("GoogleEJB.doSpellingSuggestion() called with " +
+ phrase);
+
+ String returnValue = phrase + "spelling suggestion";
+
+ System.out.println("GoogleEJB returning " + returnValue);
+
+ return returnValue;
+ }
+
+ public GoogleSearchResult doGoogleSearch(java.lang.String key, java.lang.String q, int start, int maxResults, boolean filter, java.lang.String restrict, boolean safeSearch, java.lang.String lr, java.lang.String ie, java.lang.String oe) {
+ return null;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MANIFEST.MF
new file mode 100644
index 0000000..73cd735
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: google.MEJBClient
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MEJBClient.java b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MEJBClient.java
new file mode 100644
index 0000000..5ffa564
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/MEJBClient.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2001, 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 google;
+
+//import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import java.io.*;
+import java.util.*;
+import java.net.*;
+import javax.management.j2ee.ManagementHome;
+import javax.management.j2ee.Management;
+import javax.management.*;
+import javax.naming.*;
+import javax.rmi.PortableRemoteObject;
+
+public class MEJBClient {
+
+// private SimpleReporterAdapter stat =
+// new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ MEJBClient client = new MEJBClient();
+
+ // run the tests
+ client.runTestClient();
+ }
+
+ public void runTestClient() {
+ try{
+// stat.addDescription("Testing webservices mejb client app.");
+ test01();
+// stat.printSummary("webservicesMejbAppID");
+ } catch (Exception ex) {
+ System.out.println("Exception in runTestClient: " + ex.toString());
+ ex.printStackTrace();
+ }
+ }
+
+ public void test01() {
+
+ // instanciate the mejb
+ try {
+
+ Context ic = new InitialContext();
+ System.out.println("***Created initial context");
+
+ java.lang.Object objref = ic.lookup("ejb/mgmt/MEJB");
+ System.out.println("***Looked up ManagementHome!!");
+
+ ManagementHome home = (ManagementHome)PortableRemoteObject.narrow(
+ objref, ManagementHome.class);
+ System.out.println("***Narrowed ManagementHome!!");
+
+ Management mejb = home.create();
+ System.out.println("***Got the MEJB!!");
+
+ String domain = mejb.getDefaultDomain();
+ System.out.println("***MEJB default domain = "+domain);
+ int mbeanCount = mejb.getMBeanCount().intValue();
+ System.out.println("***MBeanCount = "+mbeanCount);
+
+ // Print attributes of all MBeans
+ ObjectName query = new ObjectName("*:j2eeType=J2EEApplication,name=googleApp,*");
+ Set mbeanNames = mejb.queryNames(query, null);
+ if ( mbeanNames.size() != 1 ) {
+ System.out.println("***ERROR: mbeans returned by query is "
+ +mbeanNames.size() + " it should be 1");
+ }
+
+ Iterator it = mbeanNames.iterator();
+ ObjectName name = (ObjectName)it.next();
+ System.out.println("Obtained jsr77 mbean for googleApp = "+name);
+
+ // Get attr values from MEJB and print them
+ try{
+ Object attr = mejb.getAttribute(name, "hasWebServices");
+ boolean hasWebServices=false;
+ if (attr instanceof Boolean) {
+ hasWebServices = ((Boolean) attr).booleanValue();
+ }
+
+ System.out.println("For HasWebServices "+hasWebServices);
+
+ attr = mejb.getAttribute(name, "endpointAddresses");
+ if (attr instanceof String[]) {
+ String[] addresses = (String[]) attr;
+ for (int i=0;i<addresses.length;i++) {
+ System.out.println("Registered addresses " + addresses[i]);
+
+ // retrieve the wsdl file
+ URL url = new URL("http://localhost:8080/"+addresses[i]+"?wsdl");
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setRequestMethod("GET");
+ connection.connect();
+ int responseCode = connection.getResponseCode();
+ if (responseCode!=HttpURLConnection.HTTP_OK) {
+ System.out.println("Cannot retrieve wsdl for " + addresses[i] + " error is " + connection.getResponseMessage());
+ } else {
+ InputStream is = new BufferedInputStream(connection.getInputStream());
+ byte[] buffer = new byte[100];
+ int read;
+ do {
+ read = is.read(buffer,0, 100);
+ System.out.println(new String(buffer,0, read));
+ } while(read==100 && read!=-1);
+ }
+ }
+ }
+
+ }
+ catch(Exception exp){
+ //exp.printStackTrace();
+ System.out.println("***Exception occured while "+
+ "accessing mbean details: Keep continuing\n");
+ }
+
+ mejb.remove();
+
+ } catch(NamingException ne){
+ System.out.println("***Exception while initializing context.\n");
+ ne.printStackTrace();
+ } catch(Exception re) {
+ re.printStackTrace();
+ }
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/application-client.xml
new file mode 100644
index 0000000..75db3a9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my mejb client</description>
+ <display-name>MEJBClient</display-name>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/mejb</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>javax.management.j2ee.ManagementHome</home>
+ <remote>javax.management.j2ee.Management</remote>
+ <ejb-link>MEjbBean</ejb-link>
+ </ejb-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/sun-application-client.xml
new file mode 100644
index 0000000..5357b1b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/mejbclient/sun-application-client.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <ejb-ref>
+ <ejb-ref-name>ejbs/mejb</ejb-ref-name>
+ <jndi-name>ejb/mgmt/MEJB</jndi-name>
+ </ejb-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_appclient.xml
new file mode 100644
index 0000000..98c8655
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="GoogleSearch.wsdl"
+ packageName="google"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_ejb.xml
new file mode 100644
index 0000000..cd7bcec
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/google/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="GoogleSearch.wsdl"
+ packageName="googleejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch.wsdl b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch.wsdl
new file mode 100644
index 0000000..b618634
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch.wsdl
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- WSDL description of the Google Web APIs.
+ The Google Web APIs are in beta release. All interfaces are subject to
+ change as we refine and extend our APIs. Please see the terms of use
+ for more information. -->
+
+<definitions name="urn:GoogleSearch"
+ targetNamespace="urn:GoogleSearch"
+ xmlns:typens="urn:GoogleSearch"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <!-- Types for search - result elements, directory categories -->
+ <import namespace="urn:GoogleSearch" location="GoogleSearch_types.wsdl"/>
+
+ <!-- Binding for Google Web APIs - RPC, SOAP over HTTP -->
+
+ <binding name="GoogleSearchBinding" type="typens:GoogleSearchPort">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <operation name="doGetCachedPage">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="helloOneWay">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+
+ </operation>
+
+ </binding>
+
+ <!-- Endpoint for Google Web APIs -->
+ <service name="GoogleSearchService">
+ <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding">
+ <soap:address location="http://api.google.com/search/beta2"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_partial.wsdl b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_partial.wsdl
new file mode 100644
index 0000000..845af9e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_partial.wsdl
@@ -0,0 +1,223 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- WSDL description of the Google Web APIs.
+ The Google Web APIs are in beta release. All interfaces are subject to
+ change as we refine and extend our APIs. Please see the terms of use
+ for more information. -->
+
+<definitions name="urn:GoogleSearch"
+ targetNamespace="urn:GoogleSearch"
+ xmlns:typens="urn:GoogleSearch"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <!-- Types for search - result elements, directory categories -->
+
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:GoogleSearch">
+
+ <xsd:complexType name="GoogleSearchResult">
+ <xsd:all>
+ <xsd:element name="documentFiltering" type="xsd:boolean"/>
+ <xsd:element name="searchComments" type="xsd:string"/>
+ <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
+ <xsd:element name="estimateIsExact" type="xsd:boolean"/>
+ <xsd:element name="resultElements" type="typens:ResultElementArray"/>
+ <xsd:element name="searchQuery" type="xsd:string"/>
+ <xsd:element name="startIndex" type="xsd:int"/>
+ <xsd:element name="endIndex" type="xsd:int"/>
+ <xsd:element name="searchTips" type="xsd:string"/>
+ <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
+ <xsd:element name="searchTime" type="xsd:double"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElement">
+ <xsd:all>
+ <xsd:element name="summary" type="xsd:string"/>
+ <xsd:element name="URL" type="xsd:string"/>
+ <xsd:element name="snippet" type="xsd:string"/>
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="cachedSize" type="xsd:string"/>
+ <xsd:element name="relatedInformationPresent" type="xsd:boolean"/>
+ <xsd:element name="hostName" type="xsd:string"/>
+ <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/>
+ <xsd:element name="directoryTitle" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElementArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategoryArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategory">
+ <xsd:all>
+ <xsd:element name="fullViewableName" type="xsd:string"/>
+ <xsd:element name="specialEncoding" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <!-- Messages for Google Web APIs - cached page, search, spelling. -->
+
+ <message name="doGetCachedPage">
+ <part name="key" type="xsd:string"/>
+ <part name="url" type="xsd:string"/>
+ </message>
+
+ <message name="doGetCachedPageResponse">
+ <part name="return" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="doSpellingSuggestion">
+ <part name="key" type="xsd:string"/>
+ <part name="phrase" type="xsd:string"/>
+ </message>
+
+ <message name="doSpellingSuggestionResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearch">
+ <part name="key" type="xsd:string"/>
+ <part name="q" type="xsd:string"/>
+ <part name="start" type="xsd:int"/>
+ <part name="maxResults" type="xsd:int"/>
+ <part name="filter" type="xsd:boolean"/>
+ <part name="restrict" type="xsd:string"/>
+ <part name="safeSearch" type="xsd:boolean"/>
+ <part name="lr" type="xsd:string"/>
+ <part name="ie" type="xsd:string"/>
+ <part name="oe" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearchResponse">
+ <part name="return" type="typens:GoogleSearchResult"/>
+ </message>
+
+ <message name="helloOneWay">
+ <part name="string" type="xsd:string"/>
+ </message>
+ <message name="helloOneWayResponse"/>
+
+ <!-- Port for Google Web APIs, "GoogleSearch" -->
+
+ <portType name="GoogleSearchPort">
+
+ <operation name="doGetCachedPage">
+ <input message="typens:doGetCachedPage"/>
+ <output message="typens:doGetCachedPageResponse"/>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <input message="typens:doSpellingSuggestion"/>
+ <output message="typens:doSpellingSuggestionResponse"/>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <input message="typens:doGoogleSearch"/>
+ <output message="typens:doGoogleSearchResponse"/>
+ </operation>
+
+ <operation name="helloOneWay">
+ <input message="typens:helloOneWay"/>
+ </operation>
+
+ </portType>
+
+
+ <!-- Binding for Google Web APIs - RPC, SOAP over HTTP -->
+
+ <binding name="GoogleSearchBinding" type="typens:GoogleSearchPort">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <operation name="doGetCachedPage">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+
+ <operation name="helloOneWay">
+ <soap:operation soapAction="urn:GoogleSearchAction"/>
+ <input>
+ <soap:body use="encoded"
+ namespace="urn:GoogleSearch"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ </operation>
+
+ </binding>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_types.wsdl b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_types.wsdl
new file mode 100644
index 0000000..8bd2839
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/GoogleSearch_types.wsdl
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- WSDL description of the Google Web APIs.
+ The Google Web APIs are in beta release. All interfaces are subject to
+ change as we refine and extend our APIs. Please see the terms of use
+ for more information. -->
+
+<definitions name="urn:GoogleSearch"
+ targetNamespace="urn:GoogleSearch"
+ xmlns:typens="urn:GoogleSearch"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <!-- Types for search - result elements, directory categories -->
+
+ <types>
+ <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="urn:GoogleSearch">
+
+ <xsd:complexType name="GoogleSearchResult">
+ <xsd:all>
+ <xsd:element name="documentFiltering" type="xsd:boolean"/>
+ <xsd:element name="searchComments" type="xsd:string"/>
+ <xsd:element name="estimatedTotalResultsCount" type="xsd:int"/>
+ <xsd:element name="estimateIsExact" type="xsd:boolean"/>
+ <xsd:element name="resultElements" type="typens:ResultElementArray"/>
+ <xsd:element name="searchQuery" type="xsd:string"/>
+ <xsd:element name="startIndex" type="xsd:int"/>
+ <xsd:element name="endIndex" type="xsd:int"/>
+ <xsd:element name="searchTips" type="xsd:string"/>
+ <xsd:element name="directoryCategories" type="typens:DirectoryCategoryArray"/>
+ <xsd:element name="searchTime" type="xsd:double"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElement">
+ <xsd:all>
+ <xsd:element name="summary" type="xsd:string"/>
+ <xsd:element name="URL" type="xsd:string"/>
+ <xsd:element name="snippet" type="xsd:string"/>
+ <xsd:element name="title" type="xsd:string"/>
+ <xsd:element name="cachedSize" type="xsd:string"/>
+ <xsd:element name="relatedInformationPresent" type="xsd:boolean"/>
+ <xsd:element name="hostName" type="xsd:string"/>
+ <xsd:element name="directoryCategory" type="typens:DirectoryCategory"/>
+ <xsd:element name="directoryTitle" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResultElementArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ResultElement[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategoryArray">
+ <xsd:complexContent>
+ <xsd:restriction base="soapenc:Array">
+ <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:DirectoryCategory[]"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="DirectoryCategory">
+ <xsd:all>
+ <xsd:element name="fullViewableName" type="xsd:string"/>
+ <xsd:element name="specialEncoding" type="xsd:string"/>
+ </xsd:all>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <!-- Messages for Google Web APIs - cached page, search, spelling. -->
+
+ <message name="doGetCachedPage">
+ <part name="key" type="xsd:string"/>
+ <part name="url" type="xsd:string"/>
+ </message>
+
+ <message name="doGetCachedPageResponse">
+ <part name="return" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="doSpellingSuggestion">
+ <part name="key" type="xsd:string"/>
+ <part name="phrase" type="xsd:string"/>
+ </message>
+
+ <message name="doSpellingSuggestionResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearch">
+ <part name="key" type="xsd:string"/>
+ <part name="q" type="xsd:string"/>
+ <part name="start" type="xsd:int"/>
+ <part name="maxResults" type="xsd:int"/>
+ <part name="filter" type="xsd:boolean"/>
+ <part name="restrict" type="xsd:string"/>
+ <part name="safeSearch" type="xsd:boolean"/>
+ <part name="lr" type="xsd:string"/>
+ <part name="ie" type="xsd:string"/>
+ <part name="oe" type="xsd:string"/>
+ </message>
+
+ <message name="doGoogleSearchResponse">
+ <part name="return" type="typens:GoogleSearchResult"/>
+ </message>
+
+ <message name="helloOneWay">
+ <part name="string" type="xsd:string"/>
+ </message>
+ <message name="helloOneWayResponse"/>
+
+ <!-- Port for Google Web APIs, "GoogleSearch" -->
+
+ <portType name="GoogleSearchPort">
+
+ <operation name="doGetCachedPage">
+ <input message="typens:doGetCachedPage"/>
+ <output message="typens:doGetCachedPageResponse"/>
+ </operation>
+
+ <operation name="doSpellingSuggestion">
+ <input message="typens:doSpellingSuggestion"/>
+ <output message="typens:doSpellingSuggestionResponse"/>
+ </operation>
+
+ <operation name="doGoogleSearch">
+ <input message="typens:doGoogleSearch"/>
+ <output message="typens:doGoogleSearchResponse"/>
+ </operation>
+
+ <operation name="helloOneWay">
+ <input message="typens:helloOneWay"/>
+ </operation>
+
+ </portType>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.properties b/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.properties
new file mode 100644
index 0000000..fb29dce
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="googleserver"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="web.xml" value="descriptor/war/web.xml"/>
+<property name="sun-web.xml" value="descriptor/war/sun-web.xml"/>
+<property name="sun-webservices.xml" value="descriptor/war/webservices.xml"/>
+<property name="war.file" value="${assemble}/${appname}-web.war"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.xml
new file mode 100644
index 0000000..425fdf6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/build.xml
@@ -0,0 +1,313 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../config/run.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="google test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+
+ <target name="all" depends="clean,build,create-user,restart,deploy,run,undeploy,delete-user"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="web"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-appclient"/>
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="gen-mapping-web"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="wscompile-ejb"/>
+ <antcall target="wscompile-web"/>
+ <antcall target="assemble"/>
+ <antcall target="build-appclient-file"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -f:norpcstructures -keep -d output -s output -classpath . -model googleclient.model wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/googleclient">
+ <fileset dir="output/googleclient"
+ includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchService.class, GoogleSearchPort.class, ResultElement.class"/>
+ </copy>
+ <!-- <delete dir="output"/> -->
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -f:norpcstructures -keep -d output -s output -classpath . wscompile_config_ejb.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/googleserver">
+ <fileset dir="output/googleserver"
+ includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchPort.class, ResultElement.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="wscompile-web" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -f:norpcstructures -keep -d output -s output -model googleweb.model -classpath . wscompile_config_web.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/googleserverweb">
+ <fileset dir="output/googleserverweb"
+ includes="DirectoryCategory.class, GoogleSearchResult.class, GoogleSearchPort.class, ResultElement.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <!--
+ EJB module creation
+ -->
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch.wsdl"/>
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch_types.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="GoogleMapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="GoogleMapping_ejb.xml,META-INF/wsdl/**,googleserver/*.class" />
+
+ </antcall>
+ <!--
+ War module creation
+ -->
+ <antcall target="build-war-file"/>
+ <!--
+ AppClient module creation
+ -->
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch.wsdl"/>
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch_types.wsdl"/>
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="GoogleSearch_partial.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="GoogleMapping_appclient.xml"/>
+ <copy todir="${build.classes.dir}"
+ file="googleclient.model"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="googleclient.model,GoogleMapping_appclient.xml,META-INF/wsdl/**,googleclient/*.class" />
+
+ </antcall>
+ <!--
+ EAR file creation
+ -->
+ <antcall target="ear-common" />
+ <copy todir="${build.classes.dir}/META-INF"
+ file="${sun-application.xml}"/>
+ <jar destfile = "${assemble.dir}/${appname}App.ear"
+ update="true">
+ <fileset dir="${build.classes.dir}">
+ <include name="META-INF/sun-application.xml"/>
+ </fileset>
+ </jar>
+
+ </target>
+
+ <target name="build-appclient-file" depends="init-common">
+ </target>
+
+ <target name="build-war-file" depends="init-common">
+ <echo message="my build classes dir is:${build.classes.dir}"/>
+ <delete file="${war.file}"/>
+ <mkdir dir="${build.classes.dir}/tmp"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF"
+ file="${web.xml}"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF"
+ file="${sun-web.xml}"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF"
+ file="${sun-webservices.xml}"/>
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/wsdl"
+ file="GoogleSearch.wsdl"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/wsdl"
+ file="GoogleSearch_types.wsdl"/>
+ <copy todir="${build.classes.dir}/tmp"
+ file="GoogleMapping_web.xml"/>
+ <copy todir="${build.classes.dir}/tmp"
+ file="googleweb.model"/>
+ <copy todir="${build.classes.dir}/tmp/WEB-INF/classes/googleserverweb">
+ <fileset dir="${build.classes.dir}/googleserverweb">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp" casesensitive="yes">
+ <include name="**/**"/>
+ </fileset>
+ </jar>
+ <delete dir="${build.classes.dir}/tmp"/>
+ </target>
+
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="googleclient"/>
+ <delete dir="googleserver"/>
+ <delete dir="googleserverweb"/>
+ <delete>
+ <fileset dir="." includes="*.model"/>
+ </delete>
+ <delete file="GoogleMapping_ejb.xml"/>
+ <delete file="GoogleMapping_appclient.xml"/>
+ <delete file="GoogleMapping_web.xml"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="forwardejb http://${http.host}:${http.port}/GoogleServlet/GoogleSearch"/>
+ </antcall>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="forwardweb http://${http.host}:${http.port}/google/GoogleSearch"/>
+ </antcall>
+ <antcall target="run-standalone"/>
+ </target>
+
+ <target name="build-standalone" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen:client -keep -d ${build.classes.dir} -s ${build.classes.dir} -classpath . wscompile_config_standalone.xml"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="standalone"/>
+ </antcall>
+ </target>
+
+ <target name="run-standalone" depends="init-common">
+ <antcall target="build-standalone"/>
+ <java fork="true" classname="standalone.StandAloneClient"
+ failonerror="true">
+ <jvmarg value="-Djava.endorsed.dirs=${env.S1AS_HOME}/lib/endorsed"/>
+ <arg line="spellng http://${http.host}:${http.port}/google/GoogleSearch"/>
+ <classpath>
+ <pathelement location="${env.S1AS_HOME}/lib/j2ee.jar"/>
+ <pathelement location="${env.S1AS_HOME}/lib/appserv-cmp.jar"/>
+ <pathelement location="${env.S1AS_HOME}/lib/appserv-ext.jar"/>
+ <pathelement location="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
+ <pathelement location="${env.S1AS_HOME}/lib/webservices-rt.jar"/>
+ <pathelement location="${env.S1AS_HOME}/lib/webservices-tools.jar"/>
+ <pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
+ <pathelement location="${build.classes.dir}"/>
+ </classpath>
+
+ <sysproperty key="http.proxyHost" value="scaweb2.sfbay"/>
+ <sysproperty key="http.proxyPort" value="8080"/>
+ </java>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="contactgoogle">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="spellng"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-appclient" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping GoogleMapping_appclient.xml wscompile_config_appclient.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping GoogleMapping_ejb.xml wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-web" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping GoogleMapping_web.xml wscompile_config_web.xml"/>
+ </antcall>
+ </target>
+
+ <target name="create-user">
+ <antcall target="create-user-common">
+ <param name="user" value="j2ee"/>
+ <param name="password" value="j2ee"/>
+ <param name="groups" value="staff"/>
+ </antcall>
+ <antcall target="reconfig-common"/>
+ </target>
+
+ <target name="delete-user">
+ <!-- remove test users, just cleanup. -->
+ <antcall target="delete-user-common">
+ <param name="user" value="j2ee"/>
+ </antcall>
+ </target>
+
+ <target name="restart">
+ <antcall target="restart-server-instance-common"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ ant contactgoogle (Executes the appclient contacting the Google.com WebServices)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/Client.java
new file mode 100644
index 0000000..bdde202
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/Client.java
@@ -0,0 +1,297 @@
+/*
+ * Copyright (c) 2002, 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 googleclient;
+
+import java.io.*;
+import java.util.*;
+import java.net.URL;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import java.rmi.Remote;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static final QName PORT_QNAME =
+ new QName("urn:GoogleSearch", "GoogleSearchPort");
+ private static final QName OPERATION_QNAME =
+ new QName("urn:GoogleSearch", "doSpellingSuggestion");
+
+ private String word;
+ private String targetEndpointAddress;
+
+ public static void main (String[] args) {
+
+ stat.addDescription("googleserver appclient");
+ Client client = new Client(args);
+ client.doTest();
+ stat.printSummary("googleserver-applientID");
+ }
+
+ public Client(String[] args) {
+ word = (args.length > 0) ? args[0] : "spellng";
+ targetEndpointAddress = (args.length > 1) ? args[1] : null;
+ }
+
+ public void doTest() {
+
+ try {
+ Context ic = new InitialContext();
+ String googleKey = (String)
+ ic.lookup("java:comp/env/googlekey");
+ GoogleSearchService googleSearchService = (GoogleSearchService)
+ ic.lookup("java:comp/env/service/GoogleSearch");
+
+ try {
+ googleSearchService.getHandlerRegistry();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println
+ ("Successfully caught unsupported operation exception " +
+ "for Service.getHandlerRegistry()");
+ }
+
+ try {
+ googleSearchService.getTypeMappingRegistry();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println
+ ("Successfully caught unsupported operation exception " +
+ "for Service.getTypeMappingRegistry()");
+ }
+
+ doDynamicProxyTest(googleSearchService, googleKey);
+
+ GoogleSearchPort googleSearchPort =
+ googleSearchService.getGoogleSearchPort();
+ doSpellingSuggestion(googleSearchPort, googleKey,
+ targetEndpointAddress);
+
+ System.out.println("Using dynamic proxy to invoke endpoint");
+ Service genericServiceWithWsdl = (Service)
+ ic.lookup("java:comp/env/service/GoogleSearchProxy");
+
+ doDynamicProxyTest(genericServiceWithWsdl, googleKey);
+
+ googleSearchPort = (GoogleSearchPort)
+ genericServiceWithWsdl.getPort(GoogleSearchPort.class);
+ doSpellingSuggestion(googleSearchPort, googleKey,
+ targetEndpointAddress);
+
+ doDIINoWSDLTest(ic, googleKey, targetEndpointAddress);
+
+ System.out.println("Doing wsdl override tests");
+
+ Service partialWsdlServiceGeneric = (Service)
+ ic.lookup("java:comp/env/service/partialGeneric");
+ GoogleSearchPort googleSearch = (GoogleSearchPort)
+ partialWsdlServiceGeneric.getPort(GoogleSearchPort.class);
+ googleSearch.doSpellingSuggestion(googleKey, word);
+
+/** GoogleSearchService partialWsdlServiceGenerated =
+ (GoogleSearchService)
+ ic.lookup("java:comp/env/service/partialGenerated");
+ googleSearch = partialWsdlServiceGenerated.getGoogleSearchPort();
+ googleSearch.doSpellingSuggestion(googleKey, word);
+**/
+ stat.addStatus("appclient main", stat.PASS);
+
+
+ } catch (Exception ex) {
+ System.out.println("google client test failed");
+ ex.printStackTrace();
+ stat.addStatus("appclient main" , stat.FAIL);
+ }
+
+ }
+
+ private void doSpellingSuggestion(GoogleSearchPort googleSearchPort,
+ String googleKey,
+ String endpointAddress)
+ throws Exception {
+
+ if( endpointAddress != null ) {
+ ((Stub)googleSearchPort)._setProperty
+ (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+ System.out.println("Setting target endpoint address to " +
+ endpointAddress);
+ } else {
+ // if not set, use default
+ endpointAddress = (String)
+ ((Stub)googleSearchPort)._getProperty
+ (Stub.ENDPOINT_ADDRESS_PROPERTY);
+ }
+
+ System.out.println("Contacting google for spelling " +
+ "suggestion at " + endpointAddress);
+
+ String spellingSuggestion =
+ googleSearchPort.doSpellingSuggestion(googleKey, word);
+ System.out.println("Gave google the word '" + word + "' ... " +
+ " and the suggested spelling is '" +
+ spellingSuggestion + "'");
+ }
+
+ private void doDynamicProxyTest(Service service, String googleKey) throws Exception {
+
+ Call c1 = service.createCall();
+ Call c2 = service.createCall(PORT_QNAME);
+ Call c3 = service.createCall(PORT_QNAME, OPERATION_QNAME);
+ Call c4 = service.createCall(PORT_QNAME,
+ OPERATION_QNAME.getLocalPart());
+ Call[] calls = service.getCalls(PORT_QNAME);
+
+ if( targetEndpointAddress != null ) {
+ c3.setTargetEndpointAddress(targetEndpointAddress);
+ }
+ Object params[] = new Object[] {googleKey, "hello" };
+ String response = (String) c3.invoke(params);
+ System.out.println("Response = " + response);
+
+ // container-managed port selection
+ GoogleSearchPort sei = (GoogleSearchPort)
+ service.getPort(GoogleSearchPort.class);
+ sei = (GoogleSearchPort)
+ service.getPort(PORT_QNAME, GoogleSearchPort.class);
+
+ QName serviceName = service.getServiceName();
+ URL wsdlLocation = service.getWSDLDocumentLocation();
+ if( wsdlLocation != null ) {
+ System.out.println("wsdlLocation = " + wsdlLocation);
+ }
+ Iterator ports = service.getPorts();
+
+ System.out.println("Calling oneway operation");
+ Call oneway = service.createCall(PORT_QNAME, "helloOneWay");
+ if( targetEndpointAddress != null ) {
+ oneway.setTargetEndpointAddress(targetEndpointAddress);
+ }
+
+ long oneWayMethodWaitTimeInMillis = 7000;
+
+ Date before = new Date();
+ oneway.invokeOneWay(new Object[]
+ { oneWayMethodWaitTimeInMillis + "" });
+ Date after = new Date();
+ long elapsedTime = after.getTime() - before.getTime();
+ System.out.println("one way operation began at " + before +
+ " and returned at " + after +
+ " and took " + elapsedTime + " milli-seconds");
+ if( elapsedTime > oneWayMethodWaitTimeInMillis ) {
+ throw new Exception("one way operation blocked for too long ");
+ }
+
+ // now wait for the remainder of the time. this is to
+ // avoid race conditions where we finish the test and begin
+ // to undeploy, but the endpoint is still executing its
+ // oneway operation.
+ long sleepTime = (oneWayMethodWaitTimeInMillis - elapsedTime);
+
+ System.out.println("now sleeping for " + sleepTime + " milli secs");
+ Thread.sleep(sleepTime);
+ System.out.println("returning from doDynamicProxyTest");
+ }
+
+ private void doDIINoWSDLTest(Context ic, String googleKey,
+ String endpointAddress) throws Exception {
+
+ System.out.println("Doing DII without WSDL tests");
+
+ Service service =(Service) ic.lookup("java:comp/env/service/DIINoWSDL");
+
+ try {
+ Call call = service.createCall(PORT_QNAME);
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.createCall(QName port)");
+ }
+
+ try {
+ Call call = service.createCall(PORT_QNAME, OPERATION_QNAME);
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getCall(QName, QName)");
+ }
+
+
+ try {
+ Call call = service.createCall(PORT_QNAME, "doSpellingSuggestion");
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getCall(QName, String)");
+ }
+
+ try {
+ Call[] calls = service.getCalls(PORT_QNAME);
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getCalls()");
+ }
+
+ try {
+ service.getHandlerRegistry();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println
+ ("Successfully caught unsupported operation exception " +
+ "for Service.getHandlerRegistry()");
+ }
+
+ try {
+ Remote remote = service.getPort(GoogleSearchPort.class);
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getPort(SEI)");
+ }
+
+ try {
+ Remote remote = service.getPort(PORT_QNAME, GoogleSearchPort.class);
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getPort(QName, SEI)");
+ }
+
+ try {
+ Iterator ports = service.getPorts();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getPorts()");
+ }
+
+ try {
+ QName serviceName = service.getServiceName();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println("Successfully caught unsupported operation " +
+ "for Service.getName()");
+ }
+
+ try {
+ service.getTypeMappingRegistry();
+ } catch(java.lang.UnsupportedOperationException uoe) {
+ System.out.println
+ ("Successfully caught unsupported operation exception " +
+ "for Service.getTypeMappingRegistry()");
+ }
+
+ Call untypedCall = service.createCall();
+
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/ClientHandler.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/ClientHandler.java
new file mode 100644
index 0000000..f7105c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/ClientHandler.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002, 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 googleclient;
+
+import java.util.Map;
+
+import javax.xml.rpc.handler.Handler;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.namespace.QName;
+
+import javax.naming.InitialContext;
+
+public class ClientHandler extends GenericHandler {
+
+ public void destroy() {
+ System.out.println("In ClientHandler::destroy()");
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+
+ public boolean handleFault(MessageContext context) {
+ System.out.println("In ClientHandler::handleFault()");
+ return true;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+ System.out.println("In ClientHandler::handleRequest()");
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ System.out.println("In ClientHandler::handleResponse()");
+ return true;
+ }
+
+ public void init(HandlerInfo config) {
+ System.out.println("In ClientHandler::init()");
+ try {
+ InitialContext ic = new InitialContext();
+ String googleKey = (String) ic.lookup("java:comp/env/googlekey");
+ System.out.println("google key = " + googleKey);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ System.out.println("Handler init params = " +
+ config.getHandlerConfig());
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/MANIFEST.MF
new file mode 100644
index 0000000..6541a72
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: googleclient.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application-client.xml
new file mode 100644
index 0000000..cc01ca2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application-client.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my google app client</description>
+ <display-name>googleserverClient</display-name>
+ <env-entry>
+ <env-entry-name>googlekey</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>vCkqMIpV1WMKIRpNa7gBiYQZxDUYOYOj</env-entry-value>
+ </env-entry>
+ <service-ref>
+ <description>google service ref</description>
+ <display-name>MY GOOGLE SERVICE REF DISPLAY name</display-name>
+ <service-ref-name>service/GoogleSearch</service-ref-name>
+ <service-interface>googleclient.GoogleSearchService</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_appclient.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>googleclient.GoogleSearchPort
+ </service-endpoint-interface>
+ <port-component-link>GoogleSearchEjbPort</port-component-link>
+ </port-component-ref>
+ <handler>
+ <description>handler 1</description>
+ <handler-name>handler1</handler-name>
+ <handler-class>googleclient.ClientHandler</handler-class>
+ <init-param>
+ <description>param1 description</description>
+ <param-name>a</param-name>
+ <param-value>b</param-value>
+ </init-param>
+ <soap-header xmlns:googlens="urn:GoogleSearch">googlens:DirectoryCategory
+ </soap-header>
+ <soap-role>Role1</soap-role>
+ <soap-role>Role2</soap-role>
+ <port-name>GoogleSearchPort</port-name>
+ </handler>
+ </service-ref>
+ <service-ref>
+ <description>dynamic proxy google service ref</description>
+ <service-ref-name>service/GoogleSearchProxy</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>googleclient.model</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>googleclient.GoogleSearchPort
+ </service-endpoint-interface>
+ </port-component-ref>
+ <handler>
+ <description>handler 1</description>
+ <handler-name>handler1</handler-name>
+ <handler-class>googleclient.ClientHandler</handler-class>
+ <init-param>
+ <description>param description</description>
+ <param-name>c</param-name>
+ <param-value>d</param-value>
+ </init-param>
+ </handler>
+ </service-ref>
+ <service-ref>
+ <description>dii google service ref</description>
+ <service-ref-name>service/DIINoWSDL</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ </service-ref>
+ <service-ref>
+ <description>partial wsdl test google service ref</description>
+ <service-ref-name>service/partialGeneric</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch_partial.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_appclient.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>googleclient.GoogleSearchPort
+ </service-endpoint-interface>
+ <port-component-link>googleserver-web.war#GoogleSearchPort</port-component-link>
+ </port-component-ref>
+ </service-ref>
+<!-- <service-ref>
+ <description>partial wsdl test google service ref</description>
+ <service-ref-name>service/partialGenerated</service-ref-name>
+ <service-interface>googleclient.GoogleSearchService</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch_partial.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_appclient.xml</jaxrpc-mapping-file>
+ </service-ref>
+-->
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application.xml
new file mode 100644
index 0000000..8559847
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/application.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>GoogleServerApp</display-name>
+ <module>
+ <web>
+ <web-uri>googleserver-web.war</web-uri>
+ <context-root/>
+ </web>
+ </module>
+ <module>
+ <java>googleserver-client.jar</java>
+ </module>
+ <module>
+ <ejb>googleserver-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..6a7e35e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/ejb-jar.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>GoogleEjb</ejb-name>
+ <service-endpoint>googleserver.GoogleSearchPort</service-endpoint>
+ <ejb-class>googleserver.GoogleEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <env-entry>
+ <env-entry-name>entry1</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Blah</env-entry-value>
+ </env-entry>
+ <service-ref>
+ <description>service ref for web endpoint</description>
+ <service-ref-name>service/WebDIIReference</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>googleserver.GoogleSearchPort
+ </service-endpoint-interface>
+ <port-component-link>googleserver-web.war#GoogleSearchPort</port-component-link>
+ </port-component-ref>
+ </service-ref>
+ <security-role-ref>
+ <role-name>foo</role-name>
+ <role-link>User</role-link>
+ </security-role-ref>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <security-role>
+ <role-name>User</role-name>
+ </security-role>
+ <security-role>
+ <role-name>Admin</role-name>
+ </security-role>
+ <method-permission>
+ <role-name>User</role-name>
+ <method>
+ <ejb-name>GoogleEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>doGoogleSearch</method-name>
+ </method>
+ <method>
+ <ejb-name>GoogleEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>doSpellingSuggestion</method-name>
+ </method>
+ </method-permission>
+ <container-transaction>
+ <method>
+ <ejb-name>GoogleEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..7a3aa87
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application-client.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/GoogleSearch</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>googleclient.GoogleSearchPort
+ </service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>urn:GoogleSearch</namespaceURI>
+ <localpart>GoogleSearchPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ <call-property>
+ <name>javax.xml.rpc.security.auth.username</name>
+ <value>j2ee</value>
+ </call-property>
+ <call-property>
+ <name>javax.xml.rpc.security.auth.password</name>
+ <value>j2ee</value>
+ </call-property>
+ </port-info>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/GoogleSearchProxy</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>googleclient.GoogleSearchPort
+ </service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>urn:GoogleSearch</namespaceURI>
+ <localpart>GoogleSearchPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>javax.xml.rpc.service.endpoint.address</name>
+ <value>http://localhost:8000/google/GoogleSearch</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ <call-property>
+ <name>javax.xml.rpc.security.auth.username</name>
+ <value>j2ee</value>
+ </call-property>
+ <call-property>
+ <name>javax.xml.rpc.security.auth.password</name>
+ <value>j2ee</value>
+ </call-property>
+ </port-info>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/partialGeneric</service-ref-name>
+ <wsdl-override>file:GoogleSearch_final.wsdl</wsdl-override>
+ </service-ref>
+<!-- <service-ref>
+ <service-ref-name>service/partialGenerated</service-ref-name>
+ <wsdl-override>file:GoogleSearch_final.wsdl</wsdl-override>
+ </service-ref>
+-->
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application.xml
new file mode 100644
index 0000000..21cde76
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-application.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 J2EE Application 1.3//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_3-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application>
+ <web>
+ <web-uri>googleserver-web.war</web-uri>
+ <context-root>GoogleServlet</context-root>
+ </web>
+ <security-role-mapping>
+ <role-name>User</role-name>
+ <group-name>staff</group-name>
+ </security-role-mapping>
+ <security-role-mapping>
+ <role-name>Admin</role-name>
+ <group-name>staff</group-name>
+ <group-name>eng</group-name>
+ <group-name>mgr</group-name>
+ <group-name>guest</group-name>
+ </security-role-mapping>
+</sun-application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..5a1c38f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>GoogleEjb</ejb-name>
+ <jndi-name>GoogleEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>GoogleSearchEjbPort</port-component-name>
+ <endpoint-address-uri>google/GoogleSearch</endpoint-address-uri>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+ </webservice-endpoint>
+ </ejb>
+ <webservice-description>
+ <webservice-description-name>GoogleServiceEjb
+ </webservice-description-name>
+ <wsdl-publish-location>file:publish</wsdl-publish-location>
+ </webservice-description>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/sun-web.xml
new file mode 100644
index 0000000..89b43b9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/sun-web.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>service/EjbDIIReference</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>googleserverweb.GoogleSearchPort
+ </service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>urn:GoogleSearch</namespaceURI>
+ <localpart>GoogleSearchPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.username</name>
+ <value>j2ee</value>
+ </stub-property>
+ <stub-property>
+ <name>javax.xml.rpc.security.auth.password</name>
+ <value>j2ee</value>
+ </stub-property>
+ </port-info>
+ </service-ref>
+</sun-web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/web.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/web.xml
new file mode 100644
index 0000000..07da282
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/web.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>GoogleWebApp</display-name>
+ <servlet>
+ <servlet-name>GoogleServlet</servlet-name>
+ <servlet-class>googleserverweb.GoogleServletImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>GoogleServlet</servlet-name>
+ <url-pattern>/GoogleSearch</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <env-entry>
+ <env-entry-name>entry1</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>Blah</env-entry-value>
+ </env-entry>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/EjbDIIReference</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>WEB-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>googleweb.model</jaxrpc-mapping-file>
+ <service-qname xmlns:googlens="urn:GoogleSearch">googlens:GoogleSearchService</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>googleserverweb.GoogleSearchPort
+ </service-endpoint-interface>
+ <port-component-link>googleserver-ejb.jar#GoogleSearchEjbPort</port-component-link>
+ </port-component-ref>
+ </service-ref>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/webservices.xml
new file mode 100644
index 0000000..a433828
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/war/webservices.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description xmlns:googlens="urn:GoogleSearch">
+ <webservice-description-name>GoogleServiceServlet</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>googleweb.model</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>GoogleSearchPort</port-component-name>
+ <wsdl-port>googlens:GoogleSearchPort</wsdl-port>
+ <service-endpoint-interface>googleserverweb.GoogleSearchPort
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>GoogleServlet</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <description>handler 1</description>
+ <handler-name>handler1</handler-name>
+ <handler-class>googleserverweb.FooHandler</handler-class>
+ <init-param>
+ <description>param1 description</description>
+ <param-name>a</param-name>
+ <param-value>b</param-value>
+ </init-param>
+ <soap-header>googlens:DirectoryCategory</soap-header>
+ <soap-role>Role1</soap-role>
+ <soap-role>Role2</soap-role>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/webservices.xml
new file mode 100644
index 0000000..804e42a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/descriptor/webservices.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description xmlns:googlens="urn:GoogleSearch">
+ <webservice-description-name>GoogleServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/GoogleSearch.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>GoogleMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>GoogleSearchEjbPort</port-component-name>
+ <wsdl-port>googlens:GoogleSearchPort</wsdl-port>
+ <service-endpoint-interface>googleserver.GoogleSearchPort
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>GoogleEjb</ejb-link>
+ </service-impl-bean>
+ <handler>
+ <description>handler 1</description>
+ <handler-name>handler1</handler-name>
+ <handler-class>googleserver.FooHandler</handler-class>
+ <init-param>
+ <description>param1 description</description>
+ <param-name>a</param-name>
+ <param-value>b</param-value>
+ </init-param>
+ <soap-header>googlens:DirectoryCategory</soap-header>
+ <soap-role>Role1</soap-role>
+ <soap-role>Role2</soap-role>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/FooHandler.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/FooHandler.java
new file mode 100644
index 0000000..ffb61f5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/FooHandler.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002, 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 googleserver;
+
+import java.util.Map;
+
+import javax.xml.rpc.handler.Handler;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.namespace.QName;
+
+import javax.naming.InitialContext;
+
+public class FooHandler extends GenericHandler {
+
+ public void destroy() {
+ System.out.println("In FooHandler::destroy()");
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+
+ public boolean handleFault(MessageContext context) {
+ System.out.println("In FooHandler::handleFault()");
+ return true;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+ System.out.println("In FooHandler::handleRequest()");
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ System.out.println("In FooHandler::handleResponse()");
+ return true;
+ }
+
+ public void init(HandlerInfo config) {
+ System.out.println("In FooHandler::init()");
+ try {
+ InitialContext ic = new InitialContext();
+ String envEntry = (String) ic.lookup("java:comp/env/entry1");
+ System.out.println("env-entry = " + envEntry);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ System.out.println("Handler init params = " +
+ config.getHandlerConfig());
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/GoogleEJB.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/GoogleEJB.java
new file mode 100644
index 0000000..62aa812
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/ejb/GoogleEJB.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2002, 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 googleserver;
+
+import java.util.Iterator;
+import java.util.Date;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Call;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class GoogleEJB implements SessionBean {
+ private SessionContext sc;
+
+ private static final QName PORT_QNAME =
+ new QName("urn:GoogleSearch", "GoogleSearchPort");
+ private static final QName OPERATION_QNAME =
+ new QName("urn:GoogleSearch", "doSpellingSuggestion");
+
+ public GoogleEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In GoogleEJB::ejbCreate !!");
+ }
+
+ public byte[] doGetCachedPage(java.lang.String key, java.lang.String url)
+ {
+ return null;
+ }
+
+ public String doSpellingSuggestion(java.lang.String key,
+ java.lang.String phrase)
+ {
+
+ try {
+ InitialContext ic = new InitialContext();
+ String entry1 = (String) ic.lookup("java:comp/env/entry1");
+ System.out.println("java:comp/env/entry1 = " + entry1);
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new EJBException(e.getMessage(), e);
+ }
+
+ MessageContext msgContext = sc.getMessageContext();
+
+ System.out.println("GoogleEJB.doSpellingSuggestion() called with " +
+ phrase);
+
+ try {
+ java.security.Principal principal = sc.getCallerPrincipal();
+ System.out.println("GoogleEJB.doSpellingSuggestion():getCallerPrincipal() = " + principal);
+ if(principal == null) {
+ throw new EJBException("GoogleEJB.doSpellingSuggestion():getCallerPrincipal() cannot return NULL");
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new EJBException("GoogleEJB.doSpellingSuggestion():Unexpected exception caught - ", ex);
+ }
+
+ try {
+ boolean result = sc.isCallerInRole("foo");
+ System.out.println(
+ "GoogleEJB.doSpellingSuggestion():isCallerInRole(foo) returned - " + result);
+ if(!result) {
+ throw new EJBException("GoogleEJB.doSpellingSuggestion():isCallerInRole(foo) should not have returned false");
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new EJBException("GoogleEJB.doSpellingSuggestion():Unexpected exception caught in isCallerInRole(foo) call ", ex);
+ }
+
+ String returnValue = "spelling suggestion from ejb";
+ if( phrase.equals("forwardweb") ) {
+ System.out.println("Forwarding spelling suggestion to webendpoint");
+ Service genericServiceWithWSDL = null;
+ try {
+ InitialContext ic = new InitialContext();
+ Service service = (Service)
+ ic.lookup("java:comp/env/service/WebDIIReference");
+ doDynamicProxyTest(service);
+ GoogleSearchPort webPort = (GoogleSearchPort)
+ service.getPort(GoogleSearchPort.class);
+ returnValue = webPort.doSpellingSuggestion(key, phrase);
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new EJBException(e.getMessage(), e);
+ }
+ }
+
+ System.out.println("GoogleEJB returning " + returnValue);
+ return returnValue;
+ }
+
+ public void helloOneWay(String s1) {
+
+ System.out.println("In GoogleEJB::helloOneWay. param = " +
+ s1);
+ System.out.println("Sleeping for " + s1 + " milliseconds starting "
+ + " at " + new Date());
+
+ try {
+ Thread.sleep((new Integer(s1)).intValue());
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("Exiting GoogleEJB:helloOneWay at " +
+ new Date());
+ }
+
+ public googleserver.GoogleSearchResult doGoogleSearch(java.lang.String key, java.lang.String q, int start, int maxResults, boolean filter, java.lang.String restrict, boolean safeSearch, java.lang.String lr, java.lang.String ie, java.lang.String oe) {
+ return null;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+
+ private void doDynamicProxyTest(Service service) throws Exception {
+
+ Call c1 = service.createCall();
+ Call c2 = service.createCall(PORT_QNAME);
+ Call c3 = service.createCall(PORT_QNAME, OPERATION_QNAME);
+ Call c4 = service.createCall(PORT_QNAME,
+ OPERATION_QNAME.getLocalPart());
+ Call[] calls = service.getCalls(PORT_QNAME);
+
+ // container-managed port selection
+ GoogleSearchPort sei = (GoogleSearchPort)
+ service.getPort(GoogleSearchPort.class);
+ sei = (GoogleSearchPort)
+ service.getPort(PORT_QNAME, GoogleSearchPort.class);
+
+ QName serviceName = service.getServiceName();
+ URL wsdlLocation = service.getWSDLDocumentLocation();
+ if( wsdlLocation != null ) {
+ System.out.println("wsdlLocation = " + wsdlLocation);
+ }
+ Iterator ports = service.getPorts();
+
+ }
+
+
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/standalone/StandAloneClient.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/standalone/StandAloneClient.java
new file mode 100644
index 0000000..08f27fb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/standalone/StandAloneClient.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002, 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 standalone;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class StandAloneClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private String word;
+ private String targetEndpointAddress;
+ private String googleKey;
+
+ public static void main (String[] args) {
+ stat.addDescription("googleserver standalone");
+ StandAloneClient client = new StandAloneClient(args);
+ client.doTest();
+ stat.printSummary("googleserver-standaloneID");
+ }
+
+ public StandAloneClient(String[] args) {
+ word = (args.length > 0) ? "spellng" : args[0];
+ targetEndpointAddress = (args.length > 1) ?
+ args[1] : "http://api.google.com/search/beta2";
+ googleKey = (args.length > 2) ?
+ args[2] : "vCkqMIpV1WMKIRpNa7gBiYQZxDUYOYOj";
+ }
+
+ public void doTest() {
+ try {
+ GoogleSearchService googleSearchService =
+ new GoogleSearchService_Impl();
+
+ GoogleSearchPort googleSearchPort =
+ googleSearchService.getGoogleSearchPort();
+
+ ((Stub)googleSearchPort)._setProperty
+ (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ ((Stub)googleSearchPort)._setProperty
+ (Stub.USERNAME_PROPERTY, "j2ee");
+ ((Stub)googleSearchPort)._setProperty
+ (Stub.PASSWORD_PROPERTY, "j2ee");
+
+ System.out.println("Contacting google for spelling suggestion at "
+ + targetEndpointAddress);
+ String spellingSuggestion =
+ googleSearchPort.doSpellingSuggestion(googleKey, word);
+ System.out.println("Gave google the word '" + word + "' ... " +
+ " and the suggested spelling is '" +
+ spellingSuggestion + "'");
+
+ stat.addStatus("appclient main", stat.PASS);
+
+ } catch (Exception ex) {
+ System.out.println("google client test failed");
+ ex.printStackTrace();
+ stat.addStatus("appclient main" , stat.FAIL);
+
+ }
+
+ }
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/FooHandler.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/FooHandler.java
new file mode 100644
index 0000000..7a51507
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/FooHandler.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002, 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 googleserverweb;
+
+import java.util.Map;
+
+import javax.xml.rpc.handler.Handler;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.HandlerInfo;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.namespace.QName;
+
+import javax.naming.InitialContext;
+
+public class FooHandler extends GenericHandler {
+
+ public void destroy() {
+ System.out.println("In FooHandler::destroy()");
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+
+ public boolean handleFault(MessageContext context) {
+ System.out.println("In FooHandler::handleFault()");
+ return true;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+ System.out.println("In FooHandler::handleRequest()");
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ System.out.println("In FooHandler::handleResponse()");
+ return true;
+ }
+
+ public void init(HandlerInfo config) {
+ System.out.println("In FooHandler::init()");
+ try {
+ InitialContext ic = new InitialContext();
+ String envEntry = (String) ic.lookup("java:comp/env/entry1");
+ System.out.println("env-entry = " + envEntry);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ System.out.println("Handler init params = " +
+ config.getHandlerConfig());
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/GoogleServletImpl.java b/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/GoogleServletImpl.java
new file mode 100644
index 0000000..2acf847
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/web/GoogleServletImpl.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2002, 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 googleserverweb;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.naming.*;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.namespace.QName;
+
+public class GoogleServletImpl implements javax.servlet.SingleThreadModel, ServiceLifecycle {
+
+ private static final QName PORT_QNAME =
+ new QName("urn:GoogleSearch", "GoogleSearchPort");
+ private static final QName OPERATION_QNAME =
+ new QName("urn:GoogleSearch", "doSpellingSuggestion");
+
+ private boolean gotInit = false;
+
+ public GoogleServletImpl() {
+ System.out.println("GoogleServletImpl() instantiated");
+ }
+
+ public void init(Object context) {
+ System.out.println("Got ServiceLifecycle::init call " + context);
+ gotInit = true;
+ }
+
+ public void destroy() {
+ System.out.println("Got ServiceLifecycle::destroy call");
+ }
+
+ public byte[] doGetCachedPage(java.lang.String key, java.lang.String url)
+ {
+ return null;
+ }
+
+ public void helloOneWay(String s1) {
+
+ System.out.println("In GoogleServletImpl::helloOneWay. param = " +
+ s1);
+ System.out.println("Sleeping for " + s1 + " milliseconds starting "
+ + " at " + new Date());
+
+ try {
+ Thread.sleep((new Integer(s1)).intValue());
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("Exiting GoogleServletImpl:helloOneWay at " +
+ new Date());
+ }
+
+ public String doSpellingSuggestion(java.lang.String key,
+ java.lang.String phrase)
+
+ throws RemoteException {
+ System.out.println("GoogleServletImpl.doSpellingSuggestion() " +
+ " called with " + phrase);
+
+ if( !gotInit ) {
+ throw new RuntimeException("Got business method before init()");
+ }
+
+ String returnValue = "spelling suggestion from web";
+ if( phrase.equals("forwardejb") ) {
+ System.out.println("Forwarding spelling suggestion to ejbendpoint");
+ Service genericServiceWithWSDL = null;
+ try {
+ InitialContext ic = new InitialContext();
+ Service service = (Service)
+ ic.lookup("java:comp/env/service/EjbDIIReference");
+ doDynamicProxyTest(service);
+ GoogleSearchPort ejbPort = (GoogleSearchPort)
+ service.getPort(GoogleSearchPort.class);
+ returnValue = ejbPort.doSpellingSuggestion(key, phrase);
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new RemoteException(e.getMessage(), e);
+ }
+ }
+
+ System.out.println("GoogleServletImpl returning " + returnValue);
+ return returnValue;
+ }
+
+ public GoogleSearchResult doGoogleSearch(java.lang.String key, java.lang.String q, int start, int maxResults, boolean filter, java.lang.String restrict, boolean safeSearch, java.lang.String lr, java.lang.String ie, java.lang.String oe) {
+ return null;
+ }
+
+ private void doDynamicProxyTest(Service service) throws Exception {
+
+ Call c1 = service.createCall();
+ Call c2 = service.createCall(PORT_QNAME);
+ Call c3 = service.createCall(PORT_QNAME, OPERATION_QNAME);
+ Call c4 = service.createCall(PORT_QNAME,
+ OPERATION_QNAME.getLocalPart());
+ Call[] calls = service.getCalls(PORT_QNAME);
+
+ // container-managed port selection
+ GoogleSearchPort sei = (GoogleSearchPort)
+ service.getPort(GoogleSearchPort.class);
+ sei = (GoogleSearchPort)
+ service.getPort(PORT_QNAME, GoogleSearchPort.class);
+
+ QName serviceName = service.getServiceName();
+ URL wsdlLocation = service.getWSDLDocumentLocation();
+ if( wsdlLocation != null ) {
+ System.out.println("wsdlLocation = " + wsdlLocation);
+ }
+ Iterator ports = service.getPorts();
+
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_appclient.xml
new file mode 100644
index 0000000..5ffdeb9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="GoogleSearch.wsdl"
+ packageName="googleclient"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_ejb.xml
new file mode 100644
index 0000000..cc7a838
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="GoogleSearch.wsdl"
+ packageName="googleserver"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_standalone.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_standalone.xml
new file mode 100644
index 0000000..d9ccfe6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_standalone.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="http://localhost:8080/GoogleServlet/GoogleSearch?WSDL"
+ packageName="standalone"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_web.xml b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_web.xml
new file mode 100644
index 0000000..dd6e766
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/googleserver/wscompile_config_web.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="GoogleSearch.wsdl"
+ packageName="googleserverweb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/build.properties b/appserver/tests/appserv-tests/devtests/webservice/handler/build.properties
new file mode 100644
index 0000000..54bd850
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="simplehandler"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/build.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/build.xml
new file mode 100644
index 0000000..ef05dd5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/build.xml
@@ -0,0 +1,104 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Simple Soap fault test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+<!--
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+-->
+
+ <target name="all" depends="assemble, deploy, run, undeploy"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="gen-ejb-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/SimpleHandlerMapping_ejb.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/META-INF/wsdl config-interface.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile, gen-ejb-wsdl">
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes" value="SimpleHandlerMapping_ejb.xml,META-INF/wsdl/**,ejb/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="assemble-ejb, assemble-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="gen-ejb-wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="SimpleHandlerMapping_ejb.xml,META-INF/wsdl/**,simplehandler/**,ejb/SimpleServer.class,com/**" />
+ </antcall>
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/simplehandler"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/handler/client/Client.java
new file mode 100644
index 0000000..d2fa5f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002, 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 simplehandler;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import ejb.*;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-simple-soapfault");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-soapfaultID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ Service testService = (Service) ic.lookup("java:comp/env/service/simplehandler");
+ SimpleServer test = (SimpleServer)
+ testService.getPort(SimpleServer.class);
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+ System.out.println("Invocation returned " + test.sayHello("jerome"));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ stat.addStatus("soapfaultsclient main", stat.FAIL);
+ System.out.println("CAUGHT UNEXPECTED EXCEPTION: " + ex.getMessage());
+ }
+
+ stat.addStatus("soapfaultsclient main", stat.PASS);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/handler/client/MANIFEST.MF
new file mode 100644
index 0000000..5085a53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: simplehandler.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/config-interface.xml
new file mode 100644
index 0000000..3054949
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="SimpleHandlerServer"
+ targetNamespace="urn:HandlerTest"
+ typeNamespace="urn:HandlerTest"
+ packageName="handlertest">
+ <interface name="ejb.SimpleServer"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/application-client.xml
new file mode 100644
index 0000000..8e5029d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/application-client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my handler app client</description>
+ <display-name>handlerClient</display-name>
+ <service-ref>
+ <description>simple handler service ref</description>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/SimpleHandlerServer.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_ejb.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:HandlerTest">servicens:SimpleHandlerServer</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..f42856d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>SimpleHandlerEJB</ejb-name>
+ <service-endpoint>ejb.SimpleServer</service-endpoint>
+ <ejb-class>ejb.SimpleServerImpl</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..a4ce49f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:HandlerTest</namespaceURI>
+ <localpart>SimpleHandlerServer</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..fdeffbe
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>SimpleHandlerEJB</ejb-name>
+ <jndi-name>SimpleHandlerEJB</jndi-name>
+ <webservice-endpoint>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <endpoint-address-uri>simplehandler</endpoint-address-uri>
+ <debugging-enabled>true</debugging-enabled>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/webservices.xml
new file mode 100644
index 0000000..a688510
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/descriptor/webservices.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SimpleHandlerServer</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SimpleHandlerServer.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <wsdl-port xmlns:servicens="urn:HandlerTest">servicens:SimpleServerPort</wsdl-port>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SimpleHandlerEJB</ejb-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>ejb.SimpleHandler</handler-name>
+ <handler-class>ejb.SimpleHandler</handler-class>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleHandler.java b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleHandler.java
new file mode 100644
index 0000000..74dd711
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleHandler.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import java.util.Date;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.*;
+
+public class SimpleHandler extends GenericHandler {
+
+ protected HandlerInfo info = null;
+
+ public void init(HandlerInfo info) {
+ this.info = info;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+ try {
+ Date startTime = new Date();
+ context.setProperty("startTime", startTime);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ try {
+ Date startTime = (Date) context.getProperty("startTime");
+ Date endTime = new Date();
+ long elapsed = endTime.getTime() - startTime.getTime();
+ System.out.println(" in handler, elapsed " + elapsed);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServer.java b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServer.java
new file mode 100644
index 0000000..b78fa62
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServer.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import java.rmi.*;
+
+public interface SimpleServer extends Remote {
+
+ public String sayHello(String source) throws RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServerImpl.java b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServerImpl.java
new file mode 100644
index 0000000..edce913
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/handler/ejb/SimpleServerImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017, 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 ejb;
+
+import java.rmi.*;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+public class SimpleServerImpl implements SessionBean {
+ SessionContext sc;
+
+ public String sayHello(String hello) throws RemoteException {
+ return "salut " + hello;
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SimpleServer:::ejbCreate !!");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.properties
new file mode 100644
index 0000000..4f9cc4c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.properties
@@ -0,0 +1,42 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jaxrpc-hello-ejb"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.xml
new file mode 100644
index 0000000..c0c8c27
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/build.xml
@@ -0,0 +1,188 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+ <!ENTITY jaxrpctargets SYSTEM "../common/targets.xml">
+ <!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+ <!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+ <!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jaxrpc-hello-ejb" default="all" basedir=".">
+
+ <property name="appname" value="MyHelloEJBService"/>
+
+ <property environment="env" />
+
+ <property file="${env.APS_HOME}/config.properties"/>
+ <property file="samplebuild.properties"/>
+
+ &jaxrpctargets;
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+ <target name="all" depends="clean,deploy,assemble-client,deploy-client,runtest,undeploy"/>
+ <target name="create-ejb-jar" description="Packages the EJB JAR file">
+ <echo message="Creating the EJB JAR...."/>
+ <delete file="${assemble.ear}/${ejbjar.file}" />
+ <delete dir="${assemble.ear}/META-INF" />
+ <copy todir="${assemble.ear}">
+ <fileset dir="${build}/"
+ includes="**/*.class"
+ excludes="**/*Client.class, **/*.wsdl, **/*mapping.xml"/>
+ </copy>
+ <copy file="${build}/MyHelloService.wsdl" todir="${assemble.ear}/META-INF/wsdl" />
+ <copy file="${build}/mapping.xml" todir="${assemble.ear}/${build}/" />
+ <copy file="webservices.xml" todir="${assemble.ear}/META-INF" />
+ <copy file="ejb-jar.xml" todir="${assemble.ear}/META-INF" />
+ <copy file="sun-ejb-jar.xml" todir="${assemble.ear}/META-INF" />
+ <jar destfile="${assemble.ear}/${ejbjar.file}"
+ >
+ <fileset dir="${assemble.ear}" includes="META-INF/**, build/**,helloservice/**" />
+ </jar>
+ <copy file="${assemble.ear}/${ejbjar.file}" todir="." />
+ </target>
+
+ <target name="build" depends="build-service"
+ description="Executes the targets needed to build the service.">
+ </target>
+
+ <target name="create-ear" depends="create-ejb-jar"
+ description="Executes the targets needed to create the ejb jar.">
+ <jar destfile="${assemble.ear}/${ear.file}"
+ >
+ <fileset dir="${assemble.ear}" includes="${ejbjar.file}" />
+ </jar>
+ </target>
+
+ <target name="deploy" depends="set-asadmin,build,create-ear">
+ <echo message="admin password file ${admin.password.file}"/>
+ <echo message="admin user ${admin.user}"/>
+ <echo message="admin host ${admin.host}"/>
+ <echo message="admin port ${admin.port}"/>
+ <echo message="Deploying ${ear.file} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${assemble.ear}/${ear.name}"/>
+ </exec>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir}/webclient/WEB-INF/classes -keep -s ${build.classes.dir}/webclient/WEB-INF/classes -classpath ${build.classes.dir}/webclient/WEB-INF/classes ${config.wsdl.file}"/>
+ </antcall>
+
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="class.path"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="build/mapping.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-mapping.xml"/>
+ <copy file="build/MyHelloService.wsdl" tofile="${build.classes.dir}/webclient/WEB-INF/wsdl/hello.wsdl"/>
+ <copy file="config-wsdl.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-config.xml"/>
+
+
+
+
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying wsclient.war from ${assemble.dir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy" depends="undeploy-ear,undeploy-client"/>
+
+
+ <target name="undeploy-ear" depends="init-common">
+ <echo message="Undeploying ${ear.file} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${earname}"/>
+ </exec>
+ </target>
+
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-web.xml
new file mode 100644
index 0000000..4c2b3b1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client-web.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <service-ref>
+ <service-ref-name>service/MyHelloService</service-ref-name>
+ <service-interface>helloservice.MyHelloService</service-interface>
+ <wsdl-file>WEB-INF/wsdl/hello.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/hello-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client/TestClient.java
new file mode 100644
index 0000000..f93a1d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("jaxrpc ejb");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("jaxrpc-ejb");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF jaxrpc web SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("jaxrpc-ejb", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("jaxrpc-ejb", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-interface.xml
new file mode 100644
index 0000000..5416691
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="MyHelloService"
+ targetNamespace="urn:Foo"
+ typeNamespace="urn:Foo"
+ packageName="helloservice">
+ <interface name="helloservice.HelloIF"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-wsdl.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-wsdl.xml
new file mode 100644
index 0000000..3d1440f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/config-wsdl.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl location="build/MyHelloService.wsdl"
+ packageName="helloservice"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/ejb-jar.xml
new file mode 100644
index 0000000..097927e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="false" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+<enterprise-beans>
+<session>
+<display-name>HelloEJB</display-name>
+<ejb-name>HelloEJB</ejb-name>
+<service-endpoint>helloservice.HelloIF</service-endpoint>
+<ejb-class>helloservice.HelloImpl</ejb-class>
+<session-type>Stateless</session-type>
+<transaction-type>Container</transaction-type>
+</session>
+</enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/samplebuild.properties b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/samplebuild.properties
new file mode 100644
index 0000000..74f8a76
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/samplebuild.properties
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2017, 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
+#
+
+example=helloservice
+wsdl.file=MyHelloEJBService.wsdl
+ear.file=jaxrpc-hello-ejb.ear
+ejbjar.file=jaxrpc-hello-ejb.jar
+ear.name=jaxrpc-hello-ejb.ear
+earname=jaxrpc-hello-ejb
+
+config.interface.file=config-interface.xml
+config.wsdl.file=config-wsdl.xml
+mapping.file=mapping.xml
+build= build
+assemble=assemble
+assemble.war=${assemble}/war
+assemble.ear=${assemble}/ear
+
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloIF.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloIF.java
new file mode 100644
index 0000000..af0f518
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloIF.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2006, 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 helloservice;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+public interface HelloIF extends Remote {
+ public String sayHello(String s) throws RemoteException;
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloImpl.java
new file mode 100644
index 0000000..aede911
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/src/helloservice/HelloImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2006, 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 helloservice;
+
+import java.io.*;
+
+
+public class HelloImpl implements HelloIF {
+ public String message = "Hello ";
+
+ public String sayHello(String s) {
+ return message + s;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/sun-ejb-jar.xml
new file mode 100644
index 0000000..86b9714
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/sun-ejb-jar.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>HelloEJB</ejb-name>
+ <webservice-endpoint>
+ <port-component-name>HelloIF</port-component-name>
+ <endpoint-address-uri>/hello-jaxrpc-ejb/hello</endpoint-address-uri>
+ <service-qname>
+ <namespaceURI>urn:Foo</namespaceURI>
+ <localpart>MyHelloService</localpart>
+ </service-qname>
+ <debugging-enabled>true</debugging-enabled>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webclient/Client.java
new file mode 100644
index 0000000..c5c7a82
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webclient/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.rpc.Stub;
+import helloservice.*;
+
+
+public class Client extends HttpServlet {
+
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String targetEndpointAddress = "http://HTTP_HOST:HTTP_PORT/hello-jaxrpc-ejb/hello";//?wsdl
+ InitialContext ic = new InitialContext();
+
+ MyHelloService myHelloService =
+ (MyHelloService) ic.lookup(
+ "java:comp/env/service/MyHelloService");
+
+ HelloIF helloPort = myHelloService.getHelloIFPort();
+ ((Stub)helloPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ String ret= helloPort.sayHello("All");
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF jaxrpc web SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webservices.xml
new file mode 100644
index 0000000..0e8a818
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-ejb/webservices.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd">
+<webservice-description>
+<display-name>MyHelloService</display-name>
+<webservice-description-name>MyHelloService</webservice-description-name>
+<wsdl-file>META-INF/wsdl/MyHelloService.wsdl</wsdl-file>
+<jaxrpc-mapping-file>build/mapping.xml</jaxrpc-mapping-file>
+<port-component>
+<display-name>HelloIF</display-name>
+<port-component-name>HelloIF</port-component-name>
+<wsdl-port xmlns:wsdl-port_ns__="urn:Foo">wsdl-port_ns__:HelloIFPort</wsdl-port>
+<service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>
+<service-impl-bean>
+<ejb-link>HelloEJB</ejb-link>
+</service-impl-bean>
+</port-component>
+</webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.properties
new file mode 100644
index 0000000..fff8fac
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.properties
@@ -0,0 +1,44 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jaxrpc-hello-web"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
+
+
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.xml
new file mode 100644
index 0000000..8efec2b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/build.xml
@@ -0,0 +1,227 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+ <!ENTITY jaxrpctargets SYSTEM "../common/targets.xml">
+ <!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+ <!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+ <!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="jaxrpc-hello-web" default="all" basedir=".">
+
+ <property name="appname" value="MyHelloService"/>
+
+ <property environment="env" />
+
+ <property file="${env.APS_HOME}/config.properties"/>
+ <property file="samplebuild.properties"/>
+
+ &jaxrpctargets;
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <path id="class.path">
+ <fileset dir="${env.S1AS_HOME}/modules">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.S1AS_HOME}/modules/endorsed">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+
+ </path>
+
+ <target name="all" depends="clean,deploy,assemble-client,deploy-client,runtest,undeploy"/>
+
+
+ <target name="create-war" description="Packages the WAR file">
+ <echo message="Creating the WAR...."/>
+ <delete file="${assemble.war}/${war.file}" />
+ <delete dir="${assemble.war}/WEB-INF" />
+ <copy todir="${assemble.war}/WEB-INF/classes/">
+ <fileset dir="${build}/"
+ includes="**/*.class"
+ excludes="**/*Client.class, **/*.wsdl, **/*mapping.xml"/>
+ </copy>
+ <copy file="${build}/MyHelloService.wsdl" todir="${assemble.war}/WEB-INF/wsdl" />
+ <copy file="${build}/mapping.xml" todir="${assemble.war}/${build}/" />
+ <copy file="sun-web.xml" todir="${assemble.war}/WEB-INF" />
+ <copy file="webservices.xml" todir="${assemble.war}/WEB-INF" />
+ <war destfile="${assemble.war}/${war.file}"
+ webxml="./web.xml" filesonly="true" >
+ <fileset dir="${assemble.war}" includes="WEB-INF/**, build/**" />
+ </war>
+ <copy file="${assemble.war}/${war.file}" todir="." />
+ </target>
+
+ <target name="build" depends="build-service"
+ description="Executes the targets needed to build the service.">
+ </target>
+
+ <target name="deploy" depends="set-asadmin,build,create-war">
+ <echo message="Deploying ${war.file} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${war.file}"/>
+ </exec>
+ </target>
+
+
+
+ <target name="undeploy-war1" depends="init-common">
+ <echo message="Undeploying ${war.file} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${warname}"/>
+ </exec>
+ </target>
+
+
+ <!-- <target name="build-client" depends="build-static"
+ description="Executes the targets needed to build a static stub client.">
+ </target>
+
+ <target name="runclient1" depends="run-client"
+ description="Runs the client.">
+ </target>
+
+ <target name="run-client"
+ description="Runs a stand-alone (non-J2EE) client">
+ <java classname="${client.class}" fork="yes" >
+ <arg line="${endpoint.address}" />
+ <classpath refid="run.classpath" />
+ </java>
+ </target>
+
+
+ <target name="generate-client-stubs"
+ description="Runs wscompile to generate the client stub classes">
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir} -keep -s ${build.classes.dir} -classpath ${build.classes.dir} ${config.wsdl.file}"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common,generate-client-stubs">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <copy file="${assemble.war}/WEB-INF/wsdl/MyHelloService.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="mapping.xml,META-INF/wsdl/**,helloservice/**,com/**" />
+ </antcall>
+
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-client.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common,assemble-client">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/hello-jaxrpc/hello"/>
+ </antcall>
+ </target> -->
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <antcall target="run-wscompile">
+ <param name="param1" value="-gen:client -d ${build.classes.dir}/webclient/WEB-INF/classes -keep -s ${build.classes.dir}/webclient/WEB-INF/classes -classpath ${build.classes.dir}/webclient/WEB-INF/classes ${config.wsdl.file}"/>
+ </antcall>
+ <replace file="webclient/Client.java" value="${http.host}" token="HTTP_HOST"/>
+ <replace file="webclient/Client.java" value="${http.port}" token="HTTP_PORT"/>
+
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ includes="webclient/**">
+ <classpath refid="class.path"/>
+ </javac>
+ <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="build/mapping.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-mapping.xml"/>
+ <copy file="build/MyHelloService.wsdl" tofile="${build.classes.dir}/webclient/WEB-INF/wsdl/hello.wsdl"/>
+ <copy file="config-wsdl.xml" tofile="${build.classes.dir}/webclient/WEB-INF/hello-config.xml"/>
+
+
+
+
+ <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying wsclient.war from ${assemble.dir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy" depends="undeploy-war1,undeploy-client"/>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
+ </java>
+
+
+ <!--restore the tokens back in file-->
+ <replace file="webclient/Client.java" token="${http.host}" value="HTTP_HOST"/>
+ <replace file="webclient/Client.java" token="${http.port}" value="HTTP_PORT"/>
+ </target>
+
+
+
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-sun-web.xml
new file mode 100644
index 0000000..000e376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-web.xml
new file mode 100644
index 0000000..4c2b3b1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client-web.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <service-ref>
+ <service-ref-name>service/MyHelloService</service-ref-name>
+ <service-interface>helloservice.MyHelloService</service-interface>
+ <wsdl-file>WEB-INF/wsdl/hello.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>WEB-INF/hello-mapping.xml</jaxrpc-mapping-file>
+ <port-component-ref>
+ <service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/Client.java
new file mode 100644
index 0000000..679997f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/Client.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2002, 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 client;
+
+/*import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import helloservice.*;
+import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+*/
+public class Client {
+
+ /* private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("jaxrpc-hello-web-client");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("jaxrpc-hello-web-client");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+ Context ic = new InitialContext();
+
+ MyHelloService myHelloService =
+ (MyHelloService) ic.lookup(
+ "java:comp/env/service/helloservice");
+
+ HelloIF helloPort = myHelloService.getHelloIFPort();
+
+
+ ((Stub)helloPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+ System.out.println("Invocation returned " + helloPort.sayHello("All"));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ stat.addStatus("jaxrpc-hello-web-client main", stat.FAIL);
+ System.out.println("CAUGHT UNEXPECTED EXCEPTION: " + ex.getMessage());
+ }
+
+ stat.addStatus("jaxrpc-hello-web-client main", stat.PASS);
+ }
+*/
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/MANIFEST.MF
new file mode 100644
index 0000000..0fb13ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: client.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/TestClient.java
new file mode 100644
index 0000000..2029adb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/client/TestClient.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription("jaxrpc web");
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary("jaxrpc-web");
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF jaxrpc web SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[Hello All]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus("jaxrpc-web", stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus("jaxrpc-web", stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-interface.xml
new file mode 100644
index 0000000..5416691
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="MyHelloService"
+ targetNamespace="urn:Foo"
+ typeNamespace="urn:Foo"
+ packageName="helloservice">
+ <interface name="helloservice.HelloIF"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-wsdl.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-wsdl.xml
new file mode 100644
index 0000000..3d1440f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/config-wsdl.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl location="build/MyHelloService.wsdl"
+ packageName="helloservice"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/application-client.xml
new file mode 100644
index 0000000..eb9e97d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/application-client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my jaxrpc app client</description>
+ <display-name>jaxrpcClient</display-name>
+ <service-ref>
+ <description>simple jaxrpc service ref</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/MyHelloService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>mapping.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:Foo">servicens:HelloIF</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..d0bac8d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>helloservice.helloIF</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:Foo</namespaceURI>
+ <localpart>HelloImpl</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/samplebuild.properties b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/samplebuild.properties
new file mode 100644
index 0000000..2bc2a75
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/samplebuild.properties
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2017, 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
+#
+
+example=helloservice
+assemble=assemble
+assemble.war=assemble
+wsdl.file=MyHelloService.wsdl
+warname=jaxrpc-hello-web
+war.file=jaxrpc-hello-web.war
+war.name=jaxrpc-hello-web.war
+
+client.src=client
+
+config.interface.file=config-interface.xml
+config.wsdl.file=config-wsdl.xml
+mapping.file=mapping.xml
+build= build
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloIF.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloIF.java
new file mode 100644
index 0000000..af0f518
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloIF.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2006, 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 helloservice;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+
+public interface HelloIF extends Remote {
+ public String sayHello(String s) throws RemoteException;
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloImpl.java
new file mode 100644
index 0000000..aede911
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/src/HelloImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2006, 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 helloservice;
+
+import java.io.*;
+
+
+public class HelloImpl implements HelloIF {
+ public String message = "Hello ";
+
+ public String sayHello(String s) {
+ return message + s;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/sun-web.xml
new file mode 100644
index 0000000..6c649bd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/sun-web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>/hello-jaxrpc</context-root>
+ <servlet>
+ <servlet-name>HelloImpl</servlet-name>
+ <webservice-endpoint>
+ <port-component-name>HelloIF</port-component-name>
+ <endpoint-address-uri>hello</endpoint-address-uri>
+ </webservice-endpoint>
+ </servlet>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/web.xml
new file mode 100644
index 0000000..ac8a55d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/web.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+<display-name>MyHelloService</display-name>
+<servlet>
+<display-name>HelloImpl</display-name>
+<servlet-name>HelloImpl</servlet-name>
+<servlet-class>helloservice.HelloImpl</servlet-class>
+</servlet>
+<servlet-mapping>
+<servlet-name>HelloImpl</servlet-name>
+<url-pattern>/hello</url-pattern>
+</servlet-mapping>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webclient/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webclient/Client.java
new file mode 100644
index 0000000..cee89c5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webclient/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.rpc.Stub;
+import helloservice.*;
+
+
+public class Client extends HttpServlet {
+
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ String targetEndpointAddress = "http://HTTP_HOST:HTTP_PORT/hello-jaxrpc/hello";//?wsdl
+ InitialContext ic = new InitialContext();
+
+ MyHelloService myHelloService =
+ (MyHelloService) ic.lookup(
+ "java:comp/env/service/MyHelloService");
+
+ HelloIF helloPort = myHelloService.getHelloIFPort();
+ ((Stub)helloPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ String ret= helloPort.sayHello("All");
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF jaxrpc web SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webservices.xml
new file mode 100644
index 0000000..664e057
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jaxrpc-hello-web/webservices.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd">
+<webservice-description>
+<display-name>MyHelloService</display-name>
+<webservice-description-name>MyHelloService</webservice-description-name>
+<wsdl-file>WEB-INF/wsdl/MyHelloService.wsdl</wsdl-file>
+<jaxrpc-mapping-file>build/mapping.xml</jaxrpc-mapping-file>
+<port-component>
+<display-name>HelloIF</display-name>
+<port-component-name>HelloIF</port-component-name>
+<wsdl-port xmlns:wsdl-port_ns__="urn:Foo">wsdl-port_ns__:HelloIFPort</wsdl-port>
+<service-endpoint-interface>helloservice.HelloIF</service-endpoint-interface>
+<service-impl-bean>
+<servlet-link>HelloImpl</servlet-link>
+</service-impl-bean>
+</port-component>
+</webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/README
new file mode 100644
index 0000000..ba61d94
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/README
@@ -0,0 +1,22 @@
+Following are the instructions to run JavaEE service engine developer tests
+
+1. Start the appserver by running asadmin start-domain command
+
+2. Start JavaEE service engine and HTTP SOAP binding component using the following commands-
+ asadmin start-jbi-component sun-javaee-engine
+ asadmin start-jbi-component sun-http-binding
+
+3. Start the database by running asadmin start-database (used by transactions tests)
+
+4. Run tests by running asant all
+
+
+
+Setting JBI log levels in glassfish for debugging purposes.
+
+Java EE service engine:
+ asadmin set server.log-service.module-log-levels.server=FINE
+ asadmin set server.log-service.module-log-levels.deployment=FINE
+
+Other JBI components(BPEL, HTTPBC, etc.):
+ asadmin set server.applications.lifecycle-module.JBIFramework.property."com\.sun\.jbi\.defaultLogLevel"=FINE
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/README
new file mode 100644
index 0000000..d682944
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/README
@@ -0,0 +1,11 @@
+This is a test case to test Bare Doc/Literal style operations.
+
+The test case uses:
+------------------
+
+HTTP SOAP BC as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.properties
new file mode 100644
index 0000000..7dda984
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="bare_doc_literal-bc_consumer_se_provider"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.xml
new file mode 100644
index 0000000..2e58611
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/build.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-web"/>
+ <param name="wsName" value="Calculator"/>
+ <param name="module" value="web-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+ <target name="runtest" depends="init-common">
+ <echo message="Running SOAP Binding client"/>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..b59c2d2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/client/SOAPWebConsumer.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/bare_doc_literal-bc_consumer_se_provider/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider";
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer();
+ stat.printSummary(testId);
+ }
+
+ private void addUsingSOAPConsumer() {
+ com.example.calculator.Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ System.out.println(" Using SOAP binding's consumer to add 500 + 50 = " + port.add(50));
+ stat.addStatus(testId, stat.PASS);
+ System.out.println(" No Exception thrown");
+
+ } catch(Exception e) {
+ //e.printStackTrace();
+ if(e instanceof javax.xml.ws.soap.SOAPFaultException)
+ stat.addStatus(testId, stat.FAIL);
+ else {
+ stat.addStatus(testId, stat.FAIL);
+ System.out.println(" SOAPFaultException Not thrown");
+ }
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java
new file mode 100644
index 0000000..c109a7c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/endpoint/Calculator.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.com/Calculator"
+)
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod
+ public int add(
+ @WebParam(name = "number1", targetNamespace = "http://example.com/Calculator", partName = "part1")
+ int j
+ ) throws Exception {
+ int i = 500;
+ int k = i +j ;
+ System.out.println("JBI Test :: bare-rpc-literal bc_consumer_se_provider : " + i + "+" + j +" = " + k);
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..b4da986
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..12e1682
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.com/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.com/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="part1" element="tns:number1"/>
+ </message>
+ <message name="addResponse">
+ <part name="addResponse" element="tns:addResponse"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..30f049c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Calculator" xmlns:tns="http://example.com/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="addResponse" type="xs:int"/>
+
+ <xs:element name="number1" type="xs:int"/>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..2d1e7e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..329a809
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.com/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/bc_consumer_se_provider/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/build.xml
new file mode 100644
index 0000000..c0bf2f0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/build.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="service_unit" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="bc_consumer_se_provider" target="all"/>
+ <ant dir="se_consumer_se_provider" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/README
new file mode 100644
index 0000000..b993cc4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/README
@@ -0,0 +1,11 @@
+This is a test case to test Bare Doc/Literal style operations.
+
+The test case uses:
+------------------
+
+Java EE Service Engine as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.properties
new file mode 100644
index 0000000..3081195
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="bare_doc_literal-se_consumer_se_provider"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_service_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_su"/>
+<property name="jbi-component-su-dir" value="javaee-se-serviceunit"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.xml
new file mode 100644
index 0000000..8c715f1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/build.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${jbi-component-su-dir}/assembly/${appname}-web.war"/>
+ <delete file="${basedir}/RepRunConf.txt"/>
+ <delete dir="${basedir}/common:endpoint"/>
+ </target>
+
+ <target name="setup" depends="clean, assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="common:endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}-web.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/bare_doc_literal-se_consumer_se_provider/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/bare_doc_literal-se_consumer_se_provider/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar"
+ includes="common/**, webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-web"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-web"/>
+ <param name="wsName" value="Calculator"/>
+ <param name="module" value="web-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-client"/>
+ <antcall target="undeploy-app"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="common/**, client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client/TestClient.java
new file mode 100644
index 0000000..076c17f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/client/TestClient.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/bare_doc_literal/se_consumer_se_provider";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ StringBuffer buffer = new StringBuffer();
+ String line = null;
+ boolean found = false;
+ while ((line = input.readLine()) != null) {
+ if(line.indexOf("SUCCESS") != -1) found = true;
+ buffer.append(line + "\n");
+ }
+ log(buffer.toString());
+ if(!found) return 505;
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java
new file mode 100644
index 0000000..57b00e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/common/IncomeTaxDetails.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 common;
+
+public class IncomeTaxDetails {
+ public String firstName;
+ public String lastName;
+ public String status; // salaried, self-employed, student.
+ public long annualIncome;
+}
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java
new file mode 100644
index 0000000..04ab7d8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/endpoint/Calculator.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.*;
+import common.IncomeTaxDetails;
+import java.util.Hashtable;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod
+ public int add(
+ /*
+ @WebParam(name = "number1", targetNamespace = "http://example.web.service/Calculator", partName = "part1")
+ int i , */
+ @WebParam(name = "number2", targetNamespace = "http://example.web.service/Calculator", partName = "part2")
+ int j
+ ) throws Exception {
+ int i = 50;
+ int k = i +j ;
+ System.out.println("JBI Test :: bare-rpc-literal se_consumer_se_provider : " + i + "+" + j +" = " + k);
+ return k;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java
new file mode 100644
index 0000000..d8ebc43
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/bare_doc_literal/se_consumer_se_provider/webclient/client/Client.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+//import common.IncomeTaxDetails;
+//import java.util.Hashtable;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Calculator port = service.getCalculatorPort();
+
+ int k = port.add(505);
+ printSuccess("SUCCESS :: Sum of 505 and 50 is : ", out,k);
+
+
+ } catch(java.lang.Exception e) {
+ //e.printStackTrace();
+ printFailure(out, e.getMessage());
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out, String errMsg) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: Error message - " + errMsg);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(String message, PrintWriter out, long result) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ }
+
+ public void printSuccess(String message, PrintWriter out, String result) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/build.xml
new file mode 100644
index 0000000..0060f08
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/build.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:./report.xml">
+]>
+
+<project name="jbi-serviceengine" default="all" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+ <target name="all">
+ <delete file="${env.APS_HOME}/test_results.html"/>
+ <delete file="${env.APS_HOME}/test_resultsValid.xml"/>
+ <delete file="${env.APS_HOME}/test_results.xml"/>
+ <record name="jbi-serviceengine.output" action="start" />
+ <ant dir="server" target="all"/>
+ <ant dir="client" target="all"/>
+ <ant dir="jax-rpc" target="all"/>
+ <ant dir="soapfault" target="all"/>
+ <ant dir="oneway" target="all"/>
+ <ant dir="inout-sample" target="all"/>
+ <ant dir="service_unit" target="all"/>
+ <ant dir="transactions" target="all"/>
+ <ant dir="security" target="all"/>
+ <ant dir="bare_doc_literal" target="all"/>
+ <ant dir="rpc_literal" target="all"/>
+ <record name="jbi-serviceengine.output" action="stop" />
+ <antcall target="report"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/build.xml
new file mode 100644
index 0000000..50e495b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/build.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="jsr208-integration-client" default="all" basedir=".">
+
+
+ <target name="all">
+ <ant dir="web" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.properties
new file mode 100644
index 0000000..3f83010
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.xml
new file mode 100644
index 0000000..3f1cac9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/build.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorServicei?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ <!--<antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=false"/>
+ </antcall>-->
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client/TestClient.java
new file mode 100644
index 0000000..aae9cb4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/client/web";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[3]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/endpoint/Calculator.java
new file mode 100644
index 0000000..7553337
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/endpoint/Calculator.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..3bc80b9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..ba7b58a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..1fe2368
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..33974f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..d13e6eb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..d5d9d09
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>SunSOAPBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..ea2027c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..2484752
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <endpoint xmlns="http://www.sun.com/ns/jbi/component/soap/deploy"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sun.com/ns/jbi/component/soap/deploy ./endpoints.xsd">
+<service-name>
+ <namespace-uri>http://example.web.service/Calculator</namespace-uri>
+ <local-part>CalculatorService</local-part>
+ </service-name>
+ <endpoint-name>CalculatorPort</endpoint-name>
+ <endpoint-role>provider</endpoint-role>
+ <address-location>http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService</address-location>
+ <style>http://www.w3.org/2004/08/wsdl/style/rpc</style>
+ <operation>
+ <name>add</name>
+ <mep>http://www.w3.org/2004/08/wsdl/in-out</mep>
+ <soapaction>""</soapaction>
+ <input>
+ <namespace-uri>http://example.web.service/Calculator</namespace-uri>
+ </input>
+ <output>
+ <namespace-uri>http://example.web.service/Calculator</namespace-uri>
+ </output>
+ </operation>
+</endpoint>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/webclient/client/Client.java
new file mode 100644
index 0000000..2494f87
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/client/web/webclient/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Calculator add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/README
new file mode 100644
index 0000000..9b2a76b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/README
@@ -0,0 +1,27 @@
+Assumption : Two asadmin domains - domain1 with default port values and domain2 with following values are created, started and openESB product is installed on both the instances along with JMS Binding.
+
+Domain2 : Expected values for ports are as follows :
+instance port : 9080
+admin port : 9848
+jmx port : 9686
+
+Execution:
+
+ |--------------domain2-----------------|---------------domain1----------------------|
+ | | |
+client -|-> servlet --> JavaEE SE --> JMS BC --|--> JMS BC --> JavaEE SE --> EJB Web Service|
+
+
+Only one imq broker at 7676 ie. domain1 is used for creating queues.
+Filestore /tmp/imqobjects is used for persistence.
+
+
+Instructions to run the test case :
+
+1. Start domain1
+2. Create domain2 (step one is required so as to avoid port conflicts)
+3. start domain2
+4. install JBI on both domains
+5. Install jms binding component on both the domains. To install on domain2 use "-Djbi.port=9686" as argument.
+
+Execute asant
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/broker_passfile b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/broker_passfile
new file mode 100644
index 0000000..eda23d6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/broker_passfile
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+imq.imqcmd.password=admin
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.properties
new file mode 100644
index 0000000..dee679b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.properties
@@ -0,0 +1,42 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value=".consumer//web.xml"/>
+<property name="sun-web.xml" value="./consumer/sun-web.xml"/>
+<property name="broker.password.file" value="./broker_passfile"/>
+<property name="domain.name" value="domain2"/>
+<property name="domain2.admin.port" value="5848"/>
+<property name="domain2.instance.port" value="9080"/>
+<property name="domain2.jmx.port" value="9686"/>
+<property name="domain2.jms.port" value="8676"/>
+<property name="domain2.orb.listener.port" value="93809"/>
+<property name="domain2.http.ssl.port" value="9181"/>
+<property name="domain2.orb.mutualauth.port" value="93810"/>
+<property name="imq.broker.port" value="7676"/>
+<property name="jms-provider-assembly" value="client_ejb_provider_assembly"/>
+<property name="jms-provider-su" value="client_ejb_provider_su"/>
+<property name="jms-provider-su-dir" value="provider/jms-binding-su"/>
+<property name="jms-consumer-assembly" value="client_ejb_consumer_assembly"/>
+<property name="jms-consumer-su" value="client_ejb_consumer_su"/>
+<property name="jms-consumer-su-dir" value="consumer/jms-binding-su"/>
+<property name="QueueConnectionFactory" value="javax.jms.QueueConnectionFactory"/>
+<property name="Queue" value="javax.jms.Queue"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.xml
new file mode 100644
index 0000000..4f8dd0b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/build.xml
@@ -0,0 +1,325 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+
+ <target name="all" depends="clean, setup-server, setup-client, deploy-provider-su, deploy-consumer-su, runtest, cleanup-client, cleanup-server"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-server" depends="assemble-ejb, deploy-app, start-consumer-jms-binding"/>
+
+ <target name="setup-client" depends="assemble-client,deploy-client, start-provider-jms-binding"/>
+
+ <target name="cleanup-server" depends="undeploy-app, undeploy-consumer-su,stop-consumer-jms-binding"/>
+ <target name="cleanup-client" depends="undeploy-client, undeploy-provider-su,stop-provider-jms-binding"/>
+
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="provider/endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-consumer-su" depends="init-common">
+ <echo message="Creating QueueConnectionFactory for JMS Binding acting as a web service consumer"/>
+ <antcall target="create-jms-connection-factory">
+ <param name="jms.cf.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="create-jms-resource">
+ <param name="domain.admin.port" value="${admin.port}"/>
+ <param name="jms.res.type" value="${QueueConnectionFactory}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="deploying JMS Binding's consumer deployment "/>
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-consumer-assembly}"/>
+ <param name="jbi-component-su" value="${jms-consumer-su}"/>
+ <param name="jbi-component-su-dir" value="${jms-consumer-su-dir}"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="consumer" destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./consumer/client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./consumer/client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <echo message="Deploying the client application"/>
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--port ${domain2.admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-provider-su" depends="init-common">
+ <echo message="Creating physical destinations - queues : - provideroutgoingqueue and temporary_queue"/>
+ <antcall target="create-physical-queue">
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="create-physical-queue">
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Create QueueConnectionFactory for JMS Binding which is acting as a provider"/>
+ <antcall target="create-jms-connection-factory">
+ <param name="jms.cf.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="create-jms-resource">
+ <param name="domain.admin.port" value="${domain2.admin.port}"/>
+ <param name="jms.res.type" value="${QueueConnectionFactory}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="Create JMS resource for provideroutgoingqueue and temporary_queue"/>
+ <antcall target="create-jms-queue">
+ <param name="jms.queue.name" value="provideroutgoingqueue"/>
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="create-jms-queue">
+ <param name="jms.queue.name" value="temporary_queue"/>
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Deploy JMS Binding provider deployment"/>
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-provider-assembly}"/>
+ <param name="jbi-component-su" value="${jms-provider-su}"/>
+ <param name="jbi-component-su-dir" value="${jms-provider-su-dir}"/>
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${domain2.admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <echo message="Running the test client"/>
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="consumer/client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${domain2.instance.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="undeploy-consumer-su" depends="init-common">
+ <echo message="Undeploying JMS resource : MyQueueConnectionFactory"/>
+ <antcall target="delete-appserver-jms-resource">
+ <param name="domain.admin.port" value="${admin.port}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <!--<antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="MyQueueConnectionFactory"/>
+ </antcall>-->
+ <echo message="Undeploying JMS Binding consumer deployment"/>
+ <antcall target="undeploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-consumer-assembly}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-provider-su" depends="init-common">
+ <echo message="Undeploying JMS Resource :- provideroutgoingqueue and temporary_queue"/>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Undeploying JMS resource : MyQueueConnectionFactory"/>
+ <antcall target="delete-appserver-jms-resource">
+ <param name="domain.admin.port" value="${domain2.admin.port}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="Deleting physical queues : provideroutgoingqueue , temporary_queue"/>
+ <antcall target="delete-physical-queue">
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="delete-physical-queue">
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Undeploying JMS Binding's provider deployment"/>
+ <antcall target="undeploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-provider-assembly}"/>
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ </antcall>
+ </target>
+
+ <target name="create-domain2" depends="init-common">
+ <property name="admin.command" value="create-domain"/>
+ <property name="operand.props" value="--adminport ${domain2.admin.port} --adminuser admin --passwordfile ${admin.password.file} --instanceport ${domain2.instance.port} --savemasterpassword=true --domainproperties domain.jmxPort=${domain2.jmx.port}:jms.port=${domain2.jms.port}:orb.listner.port=${domain2.orb.listner.port}:http.ssl.port=${domain2.http.ssl.port}:orb.mutualauth.port=${domain2.orb.mutualauth.port} ${domain.name}"/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="${admin.command} ${operand.props}" />
+ </exec>
+ </target>
+
+ <target name="start-domain2" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain --user ${admin.user} ${domain.name}"/>
+ </exec>
+ </target>
+
+ <target name="create-physical-queue" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqcmd" failonerror="false">
+ <arg line="create dst -n ${queue.name} -t q -u admin -passfile ${broker.password.file} -b localhost:${imq.broker.port}"/>
+ </exec>
+ </target>
+
+ <target name="create-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="false">
+ <arg line="create-jms-resource --user ${admin.user} --passwordfile ${admin.password.file} --port ${domain.admin.port} --restype ${jms.res.type} ${jms.res.name}"/>
+ </exec>
+ </target>
+ <target name="create-jms-queue" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="false">
+ <arg line="add -l "${jms.queue.name}" -t q -o "imqDestinationName=${queue.name}" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+
+ <target name="create-jms-connection-factory" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="true">
+ <arg line="add -f -l "${jms.cf.name}" -t qf -o "imqAddressList=mq://localhost:${imq.broker.port}/jms" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+
+ <target name="delete-physical-queue" depends="init-common" >
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqcmd" failonerror="false">
+ <arg line="destroy dst -f -n ${queue.name} -t q -passfile ${broker.password.file} -u admin -b localhost:${imq.broker.port}" />
+ </exec>
+ </target>
+
+ <target name="delete-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="false">
+ <arg line="delete -f -l "${jms.resource.name}" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+ <target name="delete-appserver-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="false">
+ <arg line="delete-jms-resource --user ${admin.user} --passwordfile ${admin.password.file} --port ${domain.admin.port} ${jms.res.name}"/>
+ </exec>
+ </target>
+
+ <target name="delete-domain2" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="delete-domain domain2 " />
+ </exec>
+ </target>
+ <target name="stop-provider-jms-binding" depends="init-common">
+ <antcall target="stop-binding">
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="start-provider-jms-binding" depends="init-common">
+ <antcall target="start-binding">
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="stop-consumer-jms-binding" depends="init-common">
+ <antcall target="stop-binding">
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="start-consumer-jms-binding" depends="init-common">
+ <antcall target="start-binding">
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-sun-web.xml
new file mode 100644
index 0000000..d6e89dc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-sun-web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-web.xml
new file mode 100644
index 0000000..10c3295
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client-web.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client/TestClient.java
new file mode 100644
index 0000000..271281d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/ejb-jmsbc/consumer";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/assembly/META-INF/jbi.xml
new file mode 100644
index 0000000..d3211f6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the JMS binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service-assembly>
+ <identification>
+ <name>client_ejb_consumer_assembly</name>
+ <description>This is an SA for JMS Binding</description>
+ </identification>
+
+ <service-unit>
+ <identification>
+ <name>client_ejb_consumer_su</name>
+ <description>This is an SU that is deployed to the jms binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_ejb_consumer_su.jar</artifacts-zip>
+ <component-name>SunJMSBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService.wsdl
new file mode 100644
index 0000000..0561652
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/ejb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jms="http://sun.com/jbi/wsdl/jms10" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/ejb" name="HelloEJBService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/ejb" schemaLocation="HelloEJBService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="Hello">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloEJBJMSBinding" type="tns:Hello">
+ <jms:binding desc=""/>
+ <operation name="sayHello">
+ <input>
+ <jms:message type="TextMessage"/>
+ </input>
+ <output>
+ <jms:message type="TextMessage" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloEJBService">
+ <port name="HelloEJBPort" binding="tns:HelloEJBJMSBinding">
+ <jms:artifacts destination-name="provideroutgoingqueue"
+ endpoint-role="Consumer"
+ destination-style="Queue"
+ connection-factory-name="MyQueueConnectionFactory"
+ connection-user-name="guest"
+ connection-password="guest"
+ message-selector=""
+ time-to-live="5000"
+ reply-to=""/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService_schema1.xsd
new file mode 100644
index 0000000..87266b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/HelloEJBService_schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/ejb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/ejb"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/ejb"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/META-INF/jbi.xml
new file mode 100644
index 0000000..a19cedf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/jms-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaesb="Schema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://endpoint/ejb"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:Hello"
+ service-name="tns:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/webclient/client/Client.java
new file mode 100644
index 0000000..84b42de
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/consumer/webclient/client/Client.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ Hello port = service.getHelloEJBPort();
+ // Get Stub
+/*
+ BindingProvider stub = (BindingProvider)port;
+ //String endpointURI ="http://localhost:8080/soap/ejb/noname/helloendpoint";
+ String endpointURI ="http://localhost:12015/HelloEJBPort";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+*/
+ String ret = port.sayHello("Appserver Tester !");
+ System.out.println("Return value from webservice:"+ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Calculator add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..e02fe3b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ public String sayHello(String who) {
+ System.out.println("**** EJB Called");
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/assembly/META-INF/jbi.xml
new file mode 100644
index 0000000..a7b7b55
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the JMS binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service-assembly>
+ <identification>
+ <name>client_ejb_provider_assembly</name>
+ <description>This is an SA for JMS Binding</description>
+ </identification>
+
+ <service-unit>
+ <identification>
+ <name>client_ejb_provider_su</name>
+ <description>This is an SU that is deployed to the jms binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_ejb_provider_su.jar</artifacts-zip>
+ <component-name>SunJMSBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService.wsdl
new file mode 100644
index 0000000..99d85f5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/ejb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jms="http://sun.com/jbi/wsdl/jms10" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/ejb" name="HelloEJBService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/ejb" schemaLocation="HelloEJBService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="Hello">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloEJBJMSBinding" type="tns:Hello">
+ <jms:binding desc=""/>
+ <operation name="sayHello">
+ <input>
+ <jms:message type="TextMessage"/>
+ </input>
+ <output>
+ <jms:message type="TextMessage" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloEJBService">
+ <port name="HelloEJBPort" binding="tns:HelloEJBJMSBinding">
+ <jms:artifacts destination-name="provideroutgoingqueue"
+ endpoint-role="Provider"
+ destination-style="Queue"
+ connection-factory-name="MyQueueConnectionFactory"
+ connection-user-name="guest"
+ connection-password="guest"
+ message-selector=""
+ time-to-live="5000"
+ reply-to=""/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService_schema1.xsd
new file mode 100644
index 0000000..87266b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/HelloEJBService_schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/ejb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/ejb"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/ejb"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/META-INF/jbi.xml
new file mode 100644
index 0000000..a479d41
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/ejb-jmsbc/provider/jms-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaesb="XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://endpoint/ejb"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:Hello"
+ service-name="tns:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/README
new file mode 100644
index 0000000..068e267
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/README
@@ -0,0 +1,9 @@
+This is a two way message exchage sample.
+
+This sample exercises JavaEE SE as both Consumer & Provider.
+
+Execution path:
+
+ Client <-----> Servlet <-----> Java SE Consumer <---> NMR <----> Java SE Provider <---> EndPoint
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.properties
new file mode 100644
index 0000000..0300108
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.xml
new file mode 100644
index 0000000..dc63f00
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/build.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/AdderService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/AdderService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ <!--<antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Adder.jbi-enabled=false"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <!--<antcall target="undeploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-web"/>
+ <param name="wsName" value="Adder"/>
+ <param name="module" value="web-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-sun-web.xml
new file mode 100644
index 0000000..cd1f76e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/adder</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Adder</namespaceURI>
+ <localpart>AdderPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.adder.Adder</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client/TestClient.java
new file mode 100644
index 0000000..2701365
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/client/TestClient.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+
+ private static String testId = "jbi-serviceengine/inout-sample";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ //for(int i=0; i<1000; i++) {
+ int code = invokeServlet(url);
+ //System.out.println("client ID : " + i);
+ report(code);
+ //}
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("Value is") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/endpoint/Adder.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/endpoint/Adder.java
new file mode 100644
index 0000000..d40d075
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/endpoint/Adder.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="Adder",
+ serviceName="AdderService",
+ targetNamespace="http://example.web.service/Adder"
+)
+public class Adder {
+ public Adder() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i -j ;
+ System.err.println(i + "-" + j +" = " + k);
+ return k;
+
+ /*
+ if(i == 101)
+ throw new RuntimeException("This is my exception in add ...");
+ */
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..3bc80b9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl
new file mode 100644
index 0000000..8255f23
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService.wsdl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost.localdomain:8080/calc-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService_schema1.xsd
new file mode 100644
index 0000000..16ff251
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/AdderService_schema1.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Adder" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.web.service/Adder"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..7bb96bc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Adder"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:AdderServiceInterface"
+ service-name="tns:AdderService"
+ endpoint-name="AdderPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..21de1eb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="AdderPort" service="{http://example.web.service/Adder}AdderService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/web.xml
new file mode 100644
index 0000000..da86bf4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Adder Service</description>
+ <display-name>AdderWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Adder Web Service</description>
+ <display-name>AdderWebService</display-name>
+ <servlet-name>Adder</servlet-name>
+ <servlet-class>endpoint.Adder</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Adder</servlet-name>
+ <url-pattern>/webservice/AdderService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/webclient/client/Client.java
new file mode 100644
index 0000000..cfc14d4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/inout-sample/webclient/client/Client.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.adder.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/adder") AdderService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Adder port = service.getAdderPort();
+ System.out.println("port is : " + port);
+ int result = port.add(101, 2);
+ System.out.println("result is : " + result);
+ //printFailure(out);
+ printSuccess(out, result);
+ } catch(java.lang.Exception e) {
+ e.printStackTrace();
+ //printSuccess(out);
+ printFailure(out);
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: SOAPFaultException not thrown");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out, int result) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Value is : " + result);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/build.xml
new file mode 100644
index 0000000..9f4f161
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/build.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="jsr208-integration-server" default="all" basedir=".">
+
+
+ <target name="all">
+ <ant dir="consumer" target="all"/>
+ <ant dir="provider" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest.wsdl
new file mode 100644
index 0000000..4dc31e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest.wsdl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <message name="calculateInterestResponse">
+ <part name="parameters" element="tns:calculateInterestResponse"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/>
+ <output message="tns:calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_ADDRESS"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterestNonHttpBC.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterestNonHttpBC.wsdl
new file mode 100644
index 0000000..4783528
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterestNonHttpBC.wsdl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types/>
+ <message name="InterestIF_calculateInterest">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="InterestIF_calculateInterestResponse">
+ <part name="result" type="xsd:double"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest" parameterOrder="double_1 double_2">
+ <input message="tns:InterestIF_calculateInterest"/>
+ <output message="tns:InterestIF_calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_ADDRESS"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest_Schema.xsd
new file mode 100644
index 0000000..fc4c721
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/FindInterest_Schema.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="calculateInterestResponse" type="ns2:calculateInterestResponse" xmlns:ns2="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterestResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.properties
new file mode 100644
index 0000000..c2a4564
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="findinterest"/>
+<property name="appname" value="${module}"/>
+<property name="jbi-component-su-assembly" value="ejb_findinterest_provider_assembly"/>
+<property name="jbi-component-su" value="ejb_jaxrpc_provider_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.xml
new file mode 100644
index 0000000..c39b0c0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/build.xml
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<!-- targets: clean, setup, compile, jar, war, ear, deploy, undeploy, runclient -->
+
+<project name="findintr" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &jbicommon;
+ &jbiproperties;
+ &testproperties;
+ <property environment="env" />
+ <target name="all" depends="clean, setup, compile, ear, deploy, run-servlet-invoker, undeploy"/>
+ <target name="setup" depends="init-common">
+ <property name="root.dir" value="." />
+ <property name="src.dir" value="." />
+ <property name="appname" value="FindInterestApp" />
+
+ <property name="build.dir" value="${env.APS_HOME}/build/module" />
+ <property name="build.repository" value="${build.dir}/buildears"/>
+ <property name="build.appclient" value="${build.dir}/buildappclient"/>
+ <property name="build.ejbsrc" value="${build.dir}/src/ejb" />
+ <property name="build.websrc" value="${build.dir}/src/web" />
+ <property name="build.clientsrc" value="${build.dir}/src/client" />
+
+ <property name="build.dest" value="${build.dir}/classes" />
+ <property name="build.mapping" value="${build.dir}/jaxrpc-mapping" />
+ <property name="build.desc" value="${build.dir}/descriptor" />
+ <property name="build.webinf" value="${build.dir}/webinf" />
+ <property name="build.metainf" value="${build.dir}/metainf" />
+ <property name="build.jars" value="${build.dir}/jars" />
+ <property name="build.ear" value="${build.repository}/"/>
+
+ <property name="debug" value="on" />
+ </target>
+
+ <target name="clean" depends="setup">
+ <delete dir="${build.dir}"/>
+ <delete dir="${build.repository}"/>
+ <delete dir="${build.appclient}"/>
+ </target>
+
+ <!-- target name="compile" depends="setup,clean" -->
+ <target name="compile" depends="wscompile,setup" >
+ <!-- ant target="makedirs"/ -->
+ <!-- ant target="copyfiles"/ -->
+ <javac srcdir="${build.ejbsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.websrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.clientsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar jarfile="${build.jars}/ejb.jar" >
+ <fileset dir="${build.dest}">
+ <include name="myejb/*.class"/>
+ </fileset>
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrEjbMapping.xml" />
+ </fileset>
+ <metainf dir="${build.desc}/ejb">
+ <include name="ejb-jar.xml"/>
+ <include name="webservices.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <antcall target="copy-to-webinf" />
+
+ <jar jarfile="${build.jars}/web.war" >
+ <fileset dir="${build.webinf}">
+ <include name="**/*.class"/>
+ </fileset>
+ <fileset dir="${build.mapping}">
+ <include name="IntrClientMapping.xml" />
+ </fileset>
+
+
+ <fileset dir="${build.webinf}">
+ <include name="**/web.xml" />
+ <include name="**/sun-web.xml" />
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <jar jarfile="${build.jars}/appclient.jar"
+ manifest="${build.desc}/client/MANIFEST.MF">
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrClientMapping.xml" />
+ </fileset>
+
+ <fileset dir="${build.dest}">
+ <include name="myclient/*.class"/>
+ </fileset>
+ <metainf dir="${build.desc}/client">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="copy-to-webinf">
+ <copy todir="${build.webinf}/WEB-INF/classes" filtering="on" overwrite="yes" >
+ <fileset dir="${build.dest}">
+ <include name="myclient/*.class"/>
+ </fileset>
+ </copy>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.webinf}/WEB-INF/classes"/>
+ </target>
+
+ <target name="ear" depends="clean,jar">
+ <ear earfile="${build.ear}/${appname}.ear"
+ appxml="${build.desc}/application.xml"
+ manifest="${build.desc}/MANIFEST.MF">
+
+ <fileset dir="${build.jars}" includes="*.jar,*.war" excludes="ejb.jar"/>
+
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="reporter.jar"/>
+ </fileset>
+ </ear>
+ </target>
+
+ <target name="deploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="deploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="--retrieve" />
+ <arg value="${build.appclient}" />
+ <arg value="${build.ear}/${appname}.ear" />
+ </exec>
+ <exec executable="${ASADMIN}">
+ <arg value="deploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="--retrieve" />
+ <arg value="${build.appclient}" />
+ <arg value="${build.jars}/ejb.jar" />
+ </exec>
+<antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.ejb-module.ejb.web-service-endpoint.InterestIFPort.jbi-enabled=false"/>
+ </antcall>
+
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="undeploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="${appname}" />
+ </exec>
+ <exec executable="${ASADMIN}">
+ <arg value="undeploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="ejb" />
+ </exec>
+
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="runclient" depends="setup">
+ <echo message="Executing an appclient"/>
+ <exec executable="${APPCLIENT}">
+ <env key="VMARGS" value="-Dtest.results=${results.file}" />
+ <arg value="-client" />
+ <arg value="${build.appclient}/${appname}Client.jar"/>
+ <arg value="-name" />
+ <arg value="MyAppClient" />
+ </exec>
+ </target>
+
+ <target name="makedirs">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${build.repository}" />
+ <mkdir dir="${build.appclient}" />
+ <mkdir dir="${build.ejbsrc}" />
+ <mkdir dir="${build.websrc}" />
+ <mkdir dir="${build.clientsrc}" />
+ <mkdir dir="${build.dest}" />
+ <mkdir dir="${build.mapping}" />
+ <mkdir dir="${build.desc}" />
+ <mkdir dir="${build.desc}/META-INF"/>
+ <mkdir dir="${build.desc}/ejb"/>
+ <mkdir dir="${build.desc}/client"/>
+ <mkdir dir="${build.jars}" />
+ <mkdir dir="${build.webinf}" />
+ <mkdir dir="${build.webinf}/WEB-INF" />
+ <mkdir dir="${build.webinf}/WEB-INF/wsdl" />
+ <mkdir dir="${build.webinf}/WEB-INF/classes" />
+ <mkdir dir="${build.metainf}" />
+ <mkdir dir="${build.metainf}/META-INF" />
+ <mkdir dir="${build.metainf}/META-INF/wsdl" />
+ <mkdir dir="${build.dir}/archive"/>
+ </target>
+
+ <target name="copyfiles">
+
+ <copy todir="${build.webinf}/WEB-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/web" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/ejb" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/ejb" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/client" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/client" >
+ <include name="*.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor" >
+ <include name="application.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/META-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor">
+ <include name="sun-j2ee-ri.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.ejbsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/ejb" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.websrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/web" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.clientsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/client" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.webinf}/WEB-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.metainf}/META-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="wscompile" depends="setup,makedirs,copyfiles">
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrEjbMapping.xml wscompile_config.xml
+" />
+ </exec>
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrClientMapping.xml wscompile_config_client.xml
+" />
+ </exec>
+
+ </target>
+
+ <target name="run-servlet-invoker" depends="init-common, compile">
+ <echo message="Executing a Servlet invoker"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.dest}"/>
+
+<java classname="myclient.ServletInvoker">
+ <classpath>
+ <pathelement path="${build.dest}"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/FindInterestServlet/FindInterestClient"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="ejb#InterestIFPort"/>
+ </antcall>
+ </target>
+
+<!-- <target name="all" depends="clean,ear,deploy,runclient" />-->
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClient.java
new file mode 100644
index 0000000..927d54a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClient.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClient {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+ private static String testId = "jbi-serviceengine/jax-rpc/consumer";
+
+ public FindInterestClient() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClient client = new FindInterestClient();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public double doTest() {
+
+ //String targetEndpointAddress =
+ // "http://localhost:8080/findintr/FindInterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+ return interest;
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ return -1;
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClientNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClientNonHttpBC.java
new file mode 100644
index 0000000..2214af5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestClientNonHttpBC.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClientNonHttpBC {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+ private static String testId = "jbi-serviceengine/jax-rpc/consumer";
+
+ public FindInterestClientNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClientNonHttpBC client = new FindInterestClientNonHttpBC();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public double doTest() {
+
+ String targetEndpointAddress =
+ "http://localhost:8080/findintr/FindInterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+ return interest;
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ return -1;
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestServletClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestServletClient.java
new file mode 100644
index 0000000..b91f869
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/FindInterestServletClient.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2002, 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 myclient;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.Serializable;
+import java.io.PrintWriter;
+import java.rmi.RemoteException;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+
+public class FindInterestServletClient extends HttpServlet
+ {
+ HttpServletResponse resp;
+ public FindInterestServletClient() {
+ System.out.println("FindInterestServletImpl() instantiated");
+ }
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ this.resp = resp;
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try{
+ this.resp = resp;
+ calculateInterest();
+ }catch(Exception e) {
+ throw new javax.servlet.ServletException(e);
+ }
+
+ }
+
+ public void calculateInterest() throws Exception {
+ System.out.println("calculateInterest invoked from servlet ");
+ FindInterestClient client = new FindInterestClient();
+ double interest= client.doTest();
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>FindInterestServletClient</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF FindInterest SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + interest + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumer.java
new file mode 100755
index 0000000..079755b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumer.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumer {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/consumer";
+
+ public SOAPEjbConsumer() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumer client = new SOAPEjbConsumer();
+
+ client.doTest();
+ }
+
+ private void doTest() {
+ //String targetEndpointAddress =
+ // "http://localhost:8080/soap/web/findinterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period); System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumerNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumerNonHttpBC.java
new file mode 100755
index 0000000..7c4bfbb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/SOAPEjbConsumerNonHttpBC.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumerNonHttpBC {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/consumer";
+
+ public SOAPEjbConsumerNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumerNonHttpBC client = new SOAPEjbConsumerNonHttpBC();
+
+ client.doTest();
+ }
+
+ private void doTest() {
+ String targetEndpointAddress =
+ "http://localhost:8080/soap/web/findinterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period); System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/ServletInvoker.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/ServletInvoker.java
new file mode 100644
index 0000000..6a8ba34
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/client/ServletInvoker.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class ServletInvoker {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ private static String testId = "jbi-serviceengine/jax-rpc/consumer";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ ServletInvoker client = new ServletInvoker();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF FindInterest SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[105.0]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/application.xml
new file mode 100644
index 0000000..34de701
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/application.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application>
+ <display-name>FindInterestApp</display-name>
+ <module>
+ <web>
+ <web-uri>web.war</web-uri>
+ <context-root>FindInterestServlet</context-root>
+ </web>
+ </module>
+ <module>
+ <java>appclient.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/MANIFEST.MF
new file mode 100644
index 0000000..7cc1828
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: myclient.SOAPEjbConsumer
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/application-client.xml
new file mode 100644
index 0000000..f3268b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my findintr app client</description>
+ <display-name>MyAppClient</display-name>
+ <service-ref>
+ <description>findintr service ref</description>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ <service-interface>myclient.FindInterest</service-interface>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/sun-application-client.xml
new file mode 100644
index 0000000..a313c5b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/ejb-jar.xml
new file mode 100644
index 0000000..4acc04c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/ejb-jar.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>InterestEjb</display-name>
+ <ejb-name>InterestEjb</ejb-name>
+ <service-endpoint>myejb.InterestIF</service-endpoint>
+ <ejb-class>myejb.InterestEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>InterestEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/sun-ejb-jar.xml
new file mode 100644
index 0000000..d23c426
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/sun-ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>InterestEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>InterestIFPort</port-component-name>
+ <endpoint-address-uri>findintr/FindInterest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/webservices.xml
new file mode 100644
index 0000000..f2719c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/ejb/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FindInterestEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrEjbMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>InterestIFPort</port-component-name>
+ <wsdl-port xmlns:hellons="http://hello.org/wsdl">hellons:InterestIFPort
+ </wsdl-port>
+ <service-endpoint-interface>myejb.InterestIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>InterestEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/sun-web.xml
new file mode 100644
index 0000000..3542c06
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/sun-web.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>FindInterestServlet</context-root>
+ <service-ref>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ <port-info>
+ <wsdl-port>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ <localpart>InterestIFPort</localpart>
+</wsdl-port>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/web.xml
new file mode 100644
index 0000000..0fc85ea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/descriptor/web/web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>FindInterestApp</display-name>
+ <servlet>
+ <servlet-name>FindInterestServletClient</servlet-name>
+ <servlet-class>myclient.FindInterestServletClient</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>FindInterestServletClient</servlet-name>
+ <url-pattern>/FindInterestClient</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>findintr service ref</description>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ <service-interface>myclient.FindInterest</service-interface>
+ <wsdl-file>WEB-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/ejb/InterestEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/ejb/InterestEJB.java
new file mode 100644
index 0000000..187cce6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/ejb/InterestEJB.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002, 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 myejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class InterestEJB implements SessionBean {
+
+ private SessionContext sc;
+
+ public InterestEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In InterestEJB::ejbCreate !!");
+ }
+
+ public double calculateInterest(double balance, double period) {
+ System.out.println(" Inside calculateInterest ");
+ return (balance * period * 0.1);
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMapping.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMapping.xml
new file mode 100644
index 0000000..4aa2bea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMapping.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myejb</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMappingClient.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMappingClient.xml
new file mode 100644
index 0000000..588fa00
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/mapping/FIMappingClient.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myclient</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..a1e9ffa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_findinterest_provider_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>provider_for_ejb_jaxrpc</name>
+ <description>provider service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_jaxrpc_provider_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest.wsdl
new file mode 100644
index 0000000..f269b0e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest.wsdl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <message name="calculateInterestResponse">
+ <part name="parameters" element="tns:calculateInterestResponse"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/>
+ <output message="tns:calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="http://localhost:8080/findintr/FindInterest"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest_Schema.xsd
new file mode 100644
index 0000000..fc4c721
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/FindInterest_Schema.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="calculateInterestResponse" type="ns2:calculateInterestResponse" xmlns:ns2="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterestResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..c4f6ccb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://hello.org/wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:FindInterestInterface"
+ service-name="tns:FindInterest"
+ endpoint-name="InterestIFPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..0c23185
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="InterestIFPort" service="{http://hello.org/wsdl}FindInterest"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..1acec95
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_findinterest_provider_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>provider_for_ejb_jaxrpc</name>
+ <description>provider service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_jaxrpc_provider_su.jar</artifacts-zip>
+ <component-name>SunSOAPBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..1610dee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://hello.org/wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:FindInterestInterface"
+ service-name="tns:FindInterest"
+ endpoint-name="InterestIFPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..9b0812b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <endpoint xmlns="http://www.sun.com/ns/jbi/component/soap/deploy"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sun.com/ns/jbi/component/soap/deploy ./endpoints.xsd">
+<service-name>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ <local-part>FindInterest</local-part>
+ </service-name>
+ <endpoint-name>InterestIFPort</endpoint-name>
+ <endpoint-role>provider</endpoint-role>
+ <address-location>http://localhost:8080/findintr/FindInterest</address-location>
+ <style>http://www.w3.org/2004/08/wsdl/style/rpc</style>
+ <operation>
+ <name>calculateInterest</name>
+ <mep>http://www.w3.org/2004/08/wsdl/in-out</mep>
+ <soapaction>""</soapaction>
+ <input>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ </input>
+ <output>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ </output>
+ </operation>
+</endpoint>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/web/FindInterestServletImpl.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/web/FindInterestServletImpl.java
new file mode 100644
index 0000000..9fa9be9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/web/FindInterestServletImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 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 myweb;
+
+import java.util.Iterator;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.naming.*;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.namespace.QName;
+import javax.servlet.SingleThreadModel;
+
+public class FindInterestServletImpl implements
+ SingleThreadModel, ServiceLifecycle {
+
+ public FindInterestServletImpl() {
+ System.out.println("FindInterestServletImpl() instantiated");
+ }
+
+ public void init(Object context) {
+ System.out.println("Got ServiceLifecycle::init call " + context);
+ }
+
+ public void destroy() {
+ System.out.println("Got ServiceLifecycle::destroy call");
+ }
+
+ public double calculateInterest(double balance, double period) {
+ System.out.println("calculateInterest invoked from servlet endpoint");
+ return 0.2*balance*period;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config.xml
new file mode 100644
index 0000000..4cfb954
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config_client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config_client.xml
new file mode 100644
index 0000000..ebff69c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/consumer/wscompile_config_client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myclient"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest.wsdl
new file mode 100644
index 0000000..fd6d871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest.wsdl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/>
+ </operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_ADDRESS"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest_Schema.xsd
new file mode 100644
index 0000000..8490a84
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/FindInterest_Schema.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.properties
new file mode 100644
index 0000000..ed94c05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="findinterest"/>
+<property name="appname" value="${module}"/>
+<property name="jbi-component-su-assembly" value="ejb_findinterest_assembly"/>
+<property name="jbi-component-su" value="ejb_jaxrpc_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.xml
new file mode 100644
index 0000000..486b684
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/build.xml
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "../../../../../config/properties.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<!-- targets: clean, setup, compile, jar, war, ear, deploy, undeploy, runclient -->
+
+<project name="findintr" default="all" basedir=".">
+
+ &commonSetup;
+ &jbicommon;
+ &jbiproperties;
+ &testproperties;
+ <property environment="env" />
+ <target name="all" depends="clean, setup, compile, ear, deploy, runclient, undeploy"/>
+ <target name="setup" depends="init-common">
+ <property name="root.dir" value="." />
+ <property name="src.dir" value="." />
+ <property name="appname" value="FindInterestApp" />
+
+ <property name="build.dir" value="${env.APS_HOME}/build/module" />
+ <property name="build.repository" value="${build.dir}/buildears"/>
+ <property name="build.appclient" value="${build.dir}/buildappclient"/>
+ <property name="build.ejbsrc" value="${build.dir}/src/ejb" />
+ <property name="build.websrc" value="${build.dir}/src/web" />
+ <property name="build.clientsrc" value="${build.dir}/src/client" />
+
+ <property name="build.dest" value="${build.dir}/classes" />
+ <property name="build.mapping" value="${build.dir}/jaxrpc-mapping" />
+ <property name="build.desc" value="${build.dir}/descriptor" />
+ <property name="build.webinf" value="${build.dir}/webinf" />
+ <property name="build.metainf" value="${build.dir}/metainf" />
+ <property name="build.jars" value="${build.dir}/jars" />
+ <property name="build.ear" value="${build.repository}/"/>
+
+ <property name="debug" value="on" />
+ </target>
+
+ <target name="clean" depends="setup">
+ <delete dir="${build.dir}"/>
+ <delete dir="${build.repository}"/>
+ <delete dir="${build.appclient}"/>
+ </target>
+
+ <!-- target name="compile" depends="setup,clean" -->
+ <target name="compile" depends="wscompile,setup" >
+ <!-- ant target="makedirs"/ -->
+ <!-- ant target="copyfiles"/ -->
+ <javac srcdir="${build.ejbsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.websrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.clientsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar jarfile="${build.jars}/ejb.jar" >
+ <fileset dir="${build.dest}">
+ <include name="myejb/*.class"/>
+ </fileset>
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrEjbMapping.xml" />
+ </fileset>
+<!--
+ <fileset dir=".">
+ <include name="FIMapping.xml" />
+ </fileset>
+-->
+ <metainf dir="${build.desc}/ejb">
+ <include name="ejb-jar.xml"/>
+ <include name="webservices.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <antcall target="copy-to-webinf" />
+
+ <jar jarfile="${build.jars}/web.war" >
+ <fileset dir="${build.webinf}">
+ <include name="**/*.class"/>
+ </fileset>
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrWebMapping.xml" />
+ </fileset>
+
+<!--
+ <fileset dir=".">
+ <include name="FIMappingWeb.xml" />
+ </fileset>
+-->
+ <fileset dir="${build.webinf}">
+ <include name="**/web.xml" />
+ <include name="**/sun-web.xml" />
+ <include name="**/webservices.xml" />
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <jar jarfile="${build.jars}/appclient.jar"
+ manifest="${build.desc}/client/MANIFEST.MF">
+<!--
+ <fileset dir=".">
+ <include name="FIMappingClient.xml" />
+ </fileset>
+-->
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrClientMapping.xml" />
+ </fileset>
+
+ <fileset dir="${build.dest}">
+ <include name="myclient/*.class"/>
+ </fileset>
+ <metainf dir="${build.desc}/client">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="copy-to-webinf">
+ <copy todir="${build.webinf}/WEB-INF/classes" filtering="on" overwrite="yes" >
+ <fileset dir="${build.dest}">
+ <include name="myweb/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="ear" depends="clean,jar">
+ <ear earfile="${build.ear}/${appname}.ear"
+ appxml="${build.desc}/application.xml"
+ manifest="${build.desc}/MANIFEST.MF">
+
+ <!--<fileset dir="${build.jars}" includes="*.jar,.war"/>-->
+ <fileset dir="${build.jars}" includes="*.jar"/>
+
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="reporter.jar"/>
+ </fileset>
+ </ear>
+ </target>
+
+ <target name="deploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="deploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="--retrieve" />
+ <arg value="${build.appclient}" />
+ <arg value="${build.ear}/${appname}.ear" />
+ </exec>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="undeploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="${appname}" />
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="runclient" depends="setup">
+ <exec executable="${APPCLIENT}">
+ <env key="VMARGS" value="-Dtest.results=${results.file}" />
+ <arg value="-client" />
+ <arg value="${build.appclient}/${appname}Client.jar"/>
+ <arg value="-name" />
+ <arg value="MyAppClient" />
+ </exec>
+ </target>
+
+ <target name="makedirs">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${build.repository}" />
+ <mkdir dir="${build.appclient}" />
+ <mkdir dir="${build.ejbsrc}" />
+ <mkdir dir="${build.websrc}" />
+ <mkdir dir="${build.clientsrc}" />
+ <mkdir dir="${build.dest}" />
+ <mkdir dir="${build.mapping}" />
+ <mkdir dir="${build.desc}" />
+ <mkdir dir="${build.desc}/META-INF"/>
+ <mkdir dir="${build.desc}/ejb"/>
+ <mkdir dir="${build.desc}/client"/>
+ <mkdir dir="${build.jars}" />
+ <mkdir dir="${build.webinf}" />
+ <mkdir dir="${build.webinf}/WEB-INF" />
+ <mkdir dir="${build.webinf}/WEB-INF/wsdl" />
+ <mkdir dir="${build.webinf}/WEB-INF/classes" />
+ <mkdir dir="${build.metainf}" />
+ <mkdir dir="${build.metainf}/META-INF" />
+ <mkdir dir="${build.metainf}/META-INF/wsdl" />
+ <mkdir dir="${build.dir}/archive"/>
+ </target>
+
+ <target name="copyfiles">
+
+ <copy todir="${build.webinf}/WEB-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/web" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/ejb" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/ejb" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/client" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/client" >
+ <include name="*.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor" >
+ <include name="application.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/META-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor">
+ <include name="sun-j2ee-ri.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.ejbsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/ejb" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.websrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/web" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.clientsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/client" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.webinf}/WEB-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.metainf}/META-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="wscompile" depends="setup,makedirs,copyfiles">
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrEjbMapping.xml wscompile_config.xml
+" />
+ </exec>
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrClientMapping.xml wscompile_config_client.xml
+" />
+ </exec>
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrWebMapping.xml wscompile_config_web.xml
+" />
+ </exec>
+
+ </target>
+ <!--<target name="deploy-soap-su" depends="init-common">
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su" value="${}"/>
+ <param name="jbi-component-su" value="${}"/>
+ </antcall>
+ </target>-->
+<!-- <target name="all" depends="clean,ear,deploy,runclient" />-->
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClient.java
new file mode 100644
index 0000000..e08f586
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClient.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClient {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider-oneway";
+
+ public FindInterestClient() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClient client = new FindInterestClient();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public void doTest() {
+
+ //String targetEndpointAddress =
+ // "http://localhost:8080/findintr/FindInterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ interestIFPort.calculateInterest(balance, period);
+
+ status.addStatus(testId + "1 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+
+ } catch (Exception ex) {
+ status.addStatus(testId + "1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClientNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClientNonHttpBC.java
new file mode 100644
index 0000000..ee2f42a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/FindInterestClientNonHttpBC.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClientNonHttpBC {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider-oneway";
+
+ public FindInterestClientNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClientNonHttpBC client = new FindInterestClientNonHttpBC();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public void doTest() {
+
+ String targetEndpointAddress =
+ "http://localhost:8080/findintr/FindInterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ interestIFPort.calculateInterest(balance, period);
+
+ status.addStatus(testId + "1 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+
+ } catch (Exception ex) {
+ status.addStatus(testId + "1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumer.java
new file mode 100755
index 0000000..fa02d5f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumer.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumer {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider-oneway";
+
+ public SOAPEjbConsumer() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumer client = new SOAPEjbConsumer();
+
+ client.doTest();
+ status.printSummary(testId);
+ }
+
+ private void doTest() {
+ //String targetEndpointAddress =
+ // "http://localhost:8080/soap/web/findinterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ interestIFPort.calculateInterest(balance, period);
+
+ status.addStatus(testId + "1 : EJB Endpoint Test", status.PASS);
+
+ } catch (Exception ex) {
+ status.addStatus(testId + "1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumerNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumerNonHttpBC.java
new file mode 100755
index 0000000..2b59393
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/client/SOAPEjbConsumerNonHttpBC.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumerNonHttpBC {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider-oneway";
+
+ public SOAPEjbConsumerNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumerNonHttpBC client = new SOAPEjbConsumerNonHttpBC();
+
+ client.doTest();
+ status.printSummary(testId);
+ }
+
+ private void doTest() {
+ String targetEndpointAddress =
+ "http://localhost:8080/soap/web/findinterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ interestIFPort.calculateInterest(balance, period);
+
+ status.addStatus(testId + "1 : EJB Endpoint Test", status.PASS);
+
+ } catch (Exception ex) {
+ status.addStatus(testId + "1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/application.xml
new file mode 100644
index 0000000..abe9e08
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application>
+ <display-name>FindInterestApp</display-name>
+ <module>
+ <ejb>ejb.jar</ejb>
+ </module>
+ <module>
+ <java>appclient.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/MANIFEST.MF
new file mode 100644
index 0000000..7cc1828
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: myclient.SOAPEjbConsumer
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/application-client.xml
new file mode 100644
index 0000000..f3268b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my findintr app client</description>
+ <display-name>MyAppClient</display-name>
+ <service-ref>
+ <description>findintr service ref</description>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ <service-interface>myclient.FindInterest</service-interface>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/sun-application-client.xml
new file mode 100644
index 0000000..a313c5b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/ejb-jar.xml
new file mode 100644
index 0000000..4acc04c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/ejb-jar.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>InterestEjb</display-name>
+ <ejb-name>InterestEjb</ejb-name>
+ <service-endpoint>myejb.InterestIF</service-endpoint>
+ <ejb-class>myejb.InterestEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>InterestEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/sun-ejb-jar.xml
new file mode 100644
index 0000000..d23c426
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/sun-ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>InterestEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>InterestIFPort</port-component-name>
+ <endpoint-address-uri>findintr/FindInterest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/webservices.xml
new file mode 100644
index 0000000..f2719c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/ejb/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FindInterestEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrEjbMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>InterestIFPort</port-component-name>
+ <wsdl-port xmlns:hellons="http://hello.org/wsdl">hellons:InterestIFPort
+ </wsdl-port>
+ <service-endpoint-interface>myejb.InterestIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>InterestEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/sun-web.xml
new file mode 100644
index 0000000..14674e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>FindInterestServlet</context-root>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/web.xml
new file mode 100644
index 0000000..0203114
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>FindInterestApp</display-name>
+ <servlet>
+ <servlet-name>FindInterestServlet</servlet-name>
+ <servlet-class>myweb.FindInterestServletImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>FindInterestServlet</servlet-name>
+ <url-pattern>/FindInterest</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/webservices.xml
new file mode 100644
index 0000000..51cd5ac
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/descriptor/web/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FindInterestServlet</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrWebMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>InterestIFPort</port-component-name>
+ <wsdl-port xmlns:hellons="http://hello.org/wsdl">hellons:InterestIFPort
+ </wsdl-port>
+ <service-endpoint-interface>myweb.InterestIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>FindInterestServlet</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/ejb/InterestEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/ejb/InterestEJB.java
new file mode 100644
index 0000000..0849a7a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/ejb/InterestEJB.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 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 myejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class InterestEJB implements SessionBean {
+
+ private SessionContext sc;
+
+ public InterestEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In InterestEJB::ejbCreate !!");
+ }
+
+ public void calculateInterest(double balance, double period) {
+ System.out.println(" Inside calculateInterest interest is : " + (balance * period * 0.1));
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMapping.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMapping.xml
new file mode 100644
index 0000000..4aa2bea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMapping.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myejb</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingClient.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingClient.xml
new file mode 100644
index 0000000..588fa00
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingClient.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myclient</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingWeb.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingWeb.xml
new file mode 100644
index 0000000..fc8a3a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/mapping/FIMappingWeb.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myweb</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..d16c157
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_findinterest_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_ejb_jaxrpc</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_jaxrpc_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest.wsdl
new file mode 100644
index 0000000..4727803
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest.wsdl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="http://localhost:12013/InterestIFPort"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest_Schema.xsd
new file mode 100644
index 0000000..8490a84
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/FindInterest_Schema.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..f73203b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,27 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://hello.org/wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..66627fd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="InterestIFPort" service="{http://hello.org/wsdl}FindInterest"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/web/FindInterestServletImpl.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/web/FindInterestServletImpl.java
new file mode 100644
index 0000000..e82f753
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/web/FindInterestServletImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2002, 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 myweb;
+
+import java.util.Iterator;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.naming.*;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.namespace.QName;
+import javax.servlet.SingleThreadModel;
+
+public class FindInterestServletImpl implements
+ SingleThreadModel, ServiceLifecycle {
+
+ public FindInterestServletImpl() {
+ System.out.println("FindInterestServletImpl() instantiated");
+ }
+
+ public void init(Object context) {
+ System.out.println("Got ServiceLifecycle::init call " + context);
+ }
+
+ public void destroy() {
+ System.out.println("Got ServiceLifecycle::destroy call");
+ }
+
+ public void calculateInterest(double balance, double period) {
+ System.out.println("calculateInterest invoked from servlet endpoint " + (0.2*balance*period));
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config.xml
new file mode 100644
index 0000000..4cfb954
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_client.xml
new file mode 100644
index 0000000..ebff69c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myclient"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_web.xml
new file mode 100644
index 0000000..9d1e12f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider-oneway/wscompile_config_web.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myweb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest.wsdl
new file mode 100644
index 0000000..4dc31e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest.wsdl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <message name="calculateInterestResponse">
+ <part name="parameters" element="tns:calculateInterestResponse"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/>
+ <output message="tns:calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_ADDRESS"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterestNonHttpBC.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterestNonHttpBC.wsdl
new file mode 100644
index 0000000..4783528
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterestNonHttpBC.wsdl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types/>
+ <message name="InterestIF_calculateInterest">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="InterestIF_calculateInterestResponse">
+ <part name="result" type="xsd:double"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest" parameterOrder="double_1 double_2">
+ <input message="tns:InterestIF_calculateInterest"/>
+ <output message="tns:InterestIF_calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_ADDRESS"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest_Schema.xsd
new file mode 100644
index 0000000..fc4c721
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/FindInterest_Schema.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="calculateInterestResponse" type="ns2:calculateInterestResponse" xmlns:ns2="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterestResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.properties
new file mode 100644
index 0000000..ed94c05
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="findinterest"/>
+<property name="appname" value="${module}"/>
+<property name="jbi-component-su-assembly" value="ejb_findinterest_assembly"/>
+<property name="jbi-component-su" value="ejb_jaxrpc_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.xml
new file mode 100644
index 0000000..ef9df39
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/build.xml
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<!-- targets: clean, setup, compile, jar, war, ear, deploy, undeploy, runclient -->
+
+<project name="findintr" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &jbicommon;
+ &jbiproperties;
+ &testproperties;
+ <property environment="env" />
+ <target name="all" depends="clean, setup, compile, ear, deploy, set-flag, runclient, undeploy"/>
+ <target name="setup" depends="init-common">
+ <property name="root.dir" value="." />
+ <property name="src.dir" value="." />
+ <property name="appname" value="FindInterestApp" />
+
+ <property name="build.dir" value="${env.APS_HOME}/build/module" />
+ <property name="build.repository" value="${build.dir}/buildears"/>
+ <property name="build.appclient" value="${build.dir}/buildappclient"/>
+ <property name="build.ejbsrc" value="${build.dir}/src/ejb" />
+ <property name="build.websrc" value="${build.dir}/src/web" />
+ <property name="build.clientsrc" value="${build.dir}/src/client" />
+
+ <property name="build.dest" value="${build.dir}/classes" />
+ <property name="build.mapping" value="${build.dir}/jaxrpc-mapping" />
+ <property name="build.desc" value="${build.dir}/descriptor" />
+ <property name="build.webinf" value="${build.dir}/webinf" />
+ <property name="build.metainf" value="${build.dir}/metainf" />
+ <property name="build.jars" value="${build.dir}/jars" />
+ <property name="build.ear" value="${build.repository}/"/>
+
+ <property name="debug" value="on" />
+ </target>
+
+ <target name="clean" depends="setup">
+ <delete dir="${build.dir}"/>
+ <delete dir="${build.repository}"/>
+ <delete dir="${build.appclient}"/>
+ </target>
+
+ <!-- target name="compile" depends="setup,clean" -->
+ <target name="compile" depends="wscompile,setup" >
+ <!-- ant target="makedirs"/ -->
+ <!-- ant target="copyfiles"/ -->
+ <javac srcdir="${build.ejbsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.websrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ <javac srcdir="${build.clientsrc}" destdir="${build.dest}"
+ debug="${debug}" classpath="${s1astest.classpath}" />
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar jarfile="${build.jars}/ejb.jar" >
+ <fileset dir="${build.dest}">
+ <include name="myejb/*.class"/>
+ </fileset>
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrEjbMapping.xml" />
+ </fileset>
+<!--
+ <fileset dir=".">
+ <include name="FIMapping.xml" />
+ </fileset>
+-->
+ <metainf dir="${build.desc}/ejb">
+ <include name="ejb-jar.xml"/>
+ <include name="webservices.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <antcall target="copy-to-webinf" />
+
+ <jar jarfile="${build.jars}/web.war" >
+ <fileset dir="${build.webinf}">
+ <include name="**/*.class"/>
+ </fileset>
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrWebMapping.xml" />
+ </fileset>
+
+<!--
+ <fileset dir=".">
+ <include name="FIMappingWeb.xml" />
+ </fileset>
+-->
+ <fileset dir="${build.webinf}">
+ <include name="**/web.xml" />
+ <include name="**/sun-web.xml" />
+ <include name="**/webservices.xml" />
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+
+ <jar jarfile="${build.jars}/appclient.jar"
+ manifest="${build.desc}/client/MANIFEST.MF">
+<!--
+ <fileset dir=".">
+ <include name="FIMappingClient.xml" />
+ </fileset>
+-->
+
+ <fileset dir="${build.mapping}">
+ <include name="IntrClientMapping.xml" />
+ </fileset>
+
+ <fileset dir="${build.dest}">
+ <include name="myclient/*.class"/>
+ </fileset>
+ <metainf dir="${build.desc}/client">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ </metainf>
+ <fileset dir="${build.metainf}">
+ <include name="**/FindInterest.wsdl" />
+ <include name="**/FindInterest_Schema.xsd" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="copy-to-webinf">
+ <copy todir="${build.webinf}/WEB-INF/classes" filtering="on" overwrite="yes" >
+ <fileset dir="${build.dest}">
+ <include name="myweb/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="ear" depends="clean,jar">
+ <ear earfile="${build.ear}/${appname}.ear"
+ appxml="${build.desc}/application.xml"
+ manifest="${build.desc}/MANIFEST.MF">
+
+ <!--<fileset dir="${build.jars}" includes="*.jar,.war"/>-->
+ <fileset dir="${build.jars}" includes="*.jar"/>
+
+ <fileset dir="${env.APS_HOME}/lib">
+ <include name="reporter.jar"/>
+ </fileset>
+ </ear>
+ </target>
+
+ <target name="deploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="deploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="--retrieve" />
+ <arg value="${build.appclient}" />
+ <arg value="${build.ear}/${appname}.ear" />
+ </exec>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy" depends="setup">
+ <exec executable="${ASADMIN}">
+ <arg value="undeploy" />
+ <arg value="--user" />
+ <arg value="${admin.user}" />
+ <arg value="--host" />
+ <arg value="${admin.host}" />
+ <arg value="--port" />
+ <arg value="${admin.port}" />
+ <arg value="${appname}" />
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="runclient" depends="setup">
+ <exec executable="${APPCLIENT}">
+ <env key="VMARGS" value="-Dtest.results=${results.file}" />
+ <arg value="-client" />
+ <arg value="${build.appclient}/${appname}Client.jar"/>
+ <arg value="-name" />
+ <arg value="MyAppClient" />
+ </exec>
+ </target>
+
+ <target name="makedirs">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${build.repository}" />
+ <mkdir dir="${build.appclient}" />
+ <mkdir dir="${build.ejbsrc}" />
+ <mkdir dir="${build.websrc}" />
+ <mkdir dir="${build.clientsrc}" />
+ <mkdir dir="${build.dest}" />
+ <mkdir dir="${build.mapping}" />
+ <mkdir dir="${build.desc}" />
+ <mkdir dir="${build.desc}/META-INF"/>
+ <mkdir dir="${build.desc}/ejb"/>
+ <mkdir dir="${build.desc}/client"/>
+ <mkdir dir="${build.jars}" />
+ <mkdir dir="${build.webinf}" />
+ <mkdir dir="${build.webinf}/WEB-INF" />
+ <mkdir dir="${build.webinf}/WEB-INF/wsdl" />
+ <mkdir dir="${build.webinf}/WEB-INF/classes" />
+ <mkdir dir="${build.metainf}" />
+ <mkdir dir="${build.metainf}/META-INF" />
+ <mkdir dir="${build.metainf}/META-INF/wsdl" />
+ <mkdir dir="${build.dir}/archive"/>
+ </target>
+
+ <target name="copyfiles">
+
+ <copy todir="${build.webinf}/WEB-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/web" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/ejb" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/ejb" >
+ <include name="*.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/client" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor/client" >
+ <include name="*.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor" >
+ <include name="application.xml" />
+ <include name="MANIFEST.MF" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.desc}/META-INF" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/descriptor">
+ <include name="sun-j2ee-ri.xml" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.ejbsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/ejb" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.websrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/web" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.clientsrc}" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}/client" >
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.webinf}/WEB-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ <copy todir="${build.metainf}/META-INF/wsdl" filtering="on" overwrite="yes" >
+ <fileset dir="${src.dir}" >
+ <include name="FindInterest.wsdl" />
+ <include name="FindInterest_Schema.xsd" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="wscompile" depends="setup,makedirs,copyfiles">
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrEjbMapping.xml wscompile_config.xml
+" />
+ </exec>
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrClientMapping.xml wscompile_config_client.xml
+" />
+ </exec>
+
+ <exec executable="${WSCOMPILE}">
+ <arg line="-source 1.1.2 -import -f:norpcstructures -keep -d ${build.dest} -s ${build.dest} -mapping ${build.mapping}/IntrWebMapping.xml wscompile_config_web.xml
+" />
+ </exec>
+
+ </target>
+ <!--<target name="deploy-soap-su" depends="init-common">
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su" value="${}"/>
+ <param name="jbi-component-su" value="${}"/>
+ </antcall>
+ </target>-->
+<!-- <target name="all" depends="clean,ear,deploy,runclient" />-->
+
+ <target name="set-flag" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}#ejb.jar#InterestIFPort"/>
+ </antcall>
+
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.j2ee-application.${appname}.web-service-endpoint.ejb\.jar#InterestIFPort.jbi-enabled=true"/>
+ </antcall>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClient.java
new file mode 100644
index 0000000..c73a5d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClient.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClient {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider";
+
+ public FindInterestClient() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClient client = new FindInterestClient();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public void doTest() {
+
+ //String targetEndpointAddress =
+ // "http://localhost:8080/findintr/FindInterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClientNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClientNonHttpBC.java
new file mode 100644
index 0000000..8b9660c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/FindInterestClientNonHttpBC.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+import com.sun.ejte.ccl .reporter.SimpleReporterAdapter;
+
+public class FindInterestClientNonHttpBC {
+
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider";
+
+ public FindInterestClientNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ FindInterestClientNonHttpBC client = new FindInterestClientNonHttpBC();
+
+ client.doTest();
+ // client.doServletTest();
+ }
+
+ public void doTest() {
+
+ String targetEndpointAddress =
+ "http://localhost:8080/findintr/FindInterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+
+ /* public void doServletTest() {
+ try {
+ String targetEndpointAddress =
+ "http://localhost:8080/FindInterestServlet/FindInterest";
+
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period);
+
+ System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 210.0) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.PASS);
+ }
+ } catch (Exception ex) {
+ status.addStatus(TEST_SUITE_ID+"2 : EJB Endpoint and Servlet Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ status.printSummary("JSR109 - FindInterestTest");
+ }*/
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumer.java
new file mode 100755
index 0000000..e123fea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumer.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumer {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider";
+
+ public SOAPEjbConsumer() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumer client = new SOAPEjbConsumer();
+
+ client.doTest();
+ status.printSummary(testId);
+ }
+
+ private void doTest() {
+ //String targetEndpointAddress =
+ // "http://localhost:8080/soap/web/findinterest";
+ String targetEndpointAddress =
+ "http://localhost:12013/InterestIFPort";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period); System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumerNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumerNonHttpBC.java
new file mode 100755
index 0000000..52ddb6f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/client/SOAPEjbConsumerNonHttpBC.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 myclient;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumerNonHttpBC {
+ private double balance = 300.00;
+ private double period = 3.5;
+
+ private static SimpleReporterAdapter status = new SimpleReporterAdapter();
+
+ private static String testId = "jbi-serviceengine/jax-rpc/provider";
+
+ public SOAPEjbConsumerNonHttpBC() {
+ status.addDescription(testId);
+ }
+
+ public static void main (String[] args) {
+
+ SOAPEjbConsumerNonHttpBC client = new SOAPEjbConsumerNonHttpBC();
+
+ client.doTest();
+ status.printSummary(testId);
+ }
+
+ private void doTest() {
+ String targetEndpointAddress =
+ "http://localhost:8080/soap/web/findinterest";
+
+ try {
+ Context ic = new InitialContext();
+ FindInterest findIntrService = (FindInterest)
+ ic.lookup("java:comp/env/service/FindInterest");
+
+ InterestIF interestIFPort = findIntrService.getInterestIFPort();
+
+ ((Stub)interestIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY, targetEndpointAddress);
+
+ double interest = interestIFPort.calculateInterest(balance, period); System.out.println("Interest on $300 for a period of 3.5 years is "
+ + interest);
+
+ if (interest == 105.0) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.PASS);
+ }
+
+ } catch (Exception ex) {
+ status.addStatus(testId +"1 : EJB Endpoint Test", status.FAIL);
+ System.out.println("findintr client failed");
+ ex.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/application.xml
new file mode 100644
index 0000000..abe9e08
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application>
+ <display-name>FindInterestApp</display-name>
+ <module>
+ <ejb>ejb.jar</ejb>
+ </module>
+ <module>
+ <java>appclient.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/MANIFEST.MF
new file mode 100644
index 0000000..7cc1828
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: myclient.SOAPEjbConsumer
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/application-client.xml
new file mode 100644
index 0000000..f3268b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my findintr app client</description>
+ <display-name>MyAppClient</display-name>
+ <service-ref>
+ <description>findintr service ref</description>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ <service-interface>myclient.FindInterest</service-interface>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/sun-application-client.xml
new file mode 100644
index 0000000..a313c5b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/FindInterest</service-ref-name>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/MANIFEST.MF
new file mode 100644
index 0000000..d4ea871
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Created-By: Ant 1.4.1
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/ejb-jar.xml
new file mode 100644
index 0000000..4acc04c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/ejb-jar.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>InterestEjb</display-name>
+ <ejb-name>InterestEjb</ejb-name>
+ <service-endpoint>myejb.InterestIF</service-endpoint>
+ <ejb-class>myejb.InterestEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>InterestEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/sun-ejb-jar.xml
new file mode 100644
index 0000000..d23c426
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/sun-ejb-jar.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>InterestEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>InterestIFPort</port-component-name>
+ <endpoint-address-uri>findintr/FindInterest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/webservices.xml
new file mode 100644
index 0000000..f2719c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/ejb/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FindInterestEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrEjbMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>InterestIFPort</port-component-name>
+ <wsdl-port xmlns:hellons="http://hello.org/wsdl">hellons:InterestIFPort
+ </wsdl-port>
+ <service-endpoint-interface>myejb.InterestIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>InterestEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/sun-web.xml
new file mode 100644
index 0000000..14674e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/sun-web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>FindInterestServlet</context-root>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/web.xml
new file mode 100644
index 0000000..0203114
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>FindInterestApp</display-name>
+ <servlet>
+ <servlet-name>FindInterestServlet</servlet-name>
+ <servlet-class>myweb.FindInterestServletImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>FindInterestServlet</servlet-name>
+ <url-pattern>/FindInterest</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/webservices.xml
new file mode 100644
index 0000000..51cd5ac
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/descriptor/web/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FindInterestServlet</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/FindInterest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>IntrWebMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>InterestIFPort</port-component-name>
+ <wsdl-port xmlns:hellons="http://hello.org/wsdl">hellons:InterestIFPort
+ </wsdl-port>
+ <service-endpoint-interface>myweb.InterestIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>FindInterestServlet</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/ejb/InterestEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/ejb/InterestEJB.java
new file mode 100644
index 0000000..187cce6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/ejb/InterestEJB.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002, 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 myejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class InterestEJB implements SessionBean {
+
+ private SessionContext sc;
+
+ public InterestEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In InterestEJB::ejbCreate !!");
+ }
+
+ public double calculateInterest(double balance, double period) {
+ System.out.println(" Inside calculateInterest ");
+ return (balance * period * 0.1);
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMapping.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMapping.xml
new file mode 100644
index 0000000..4aa2bea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMapping.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myejb</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingClient.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingClient.xml
new file mode 100644
index 0000000..588fa00
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingClient.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myclient</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingWeb.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingWeb.xml
new file mode 100644
index 0000000..fc8a3a8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/mapping/FIMappingWeb.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+ <package-mapping>
+ <package-type>myweb</package-type>
+ <namespaceURI>http://hello.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..d16c157
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_findinterest_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_ejb_jaxrpc</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_jaxrpc_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest.wsdl
new file mode 100644
index 0000000..601e969
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest.wsdl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="FindInterest" targetNamespace="http://hello.org/wsdl" xmlns:tns="http://hello.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<types>
+ <xsd:schema>
+ <xsd:import namespace="http://hello.org/wsdl" schemaLocation="FindInterest_Schema.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+
+ <message name="calculateInterest">
+ <part name="parameters" element="tns:calculateInterest"/>
+ </message>
+ <message name="calculateInterestResponse">
+ <part name="parameters" element="tns:calculateInterestResponse"/></message>
+ <portType name="InterestIF">
+ <operation name="calculateInterest">
+ <input message="tns:calculateInterest"/>
+ <output message="tns:calculateInterestResponse"/></operation></portType>
+ <binding name="InterestIFBinding" type="tns:InterestIF">
+ <operation name="calculateInterest">
+ <input>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></input>
+ <output>
+ <soap:body use="literal" namespace="http://hello.org/wsdl"/></output>
+ <soap:operation soapAction="urn:calculateInterest"/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/></binding>
+ <service name="FindInterest">
+ <port name="InterestIFPort" binding="tns:InterestIFBinding">
+ <soap:address location="http://localhost:12013/InterestIFPort"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest_Schema.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest_Schema.xsd
new file mode 100644
index 0000000..fc4c721
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/FindInterest_Schema.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://hello.org/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="calculateInterest" type="ns1:calculateInterest" xmlns:ns1="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterest">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:double"/>
+ <xs:element name="arg1" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="calculateInterestResponse" type="ns2:calculateInterestResponse" xmlns:ns2="http://hello.org/wsdl"/>
+
+ <xs:complexType name="calculateInterestResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:double"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..e08915c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://hello.org/wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:FindInterestInterface"
+ service-name="tns:FindInterest"
+ endpoint-name="InterestIFPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..66627fd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="InterestIFPort" service="{http://hello.org/wsdl}FindInterest"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..fcc0007
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_findinterest_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_ejb_jaxrpc</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_jaxrpc_consumer_su.jar</artifacts-zip>
+ <component-name>SunSOAPBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..1610dee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://hello.org/wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:FindInterestInterface"
+ service-name="tns:FindInterest"
+ endpoint-name="InterestIFPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..0a7869d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <endpoint xmlns="http://www.sun.com/ns/jbi/component/soap/deploy"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sun.com/ns/jbi/component/soap/deploy ./endpoints.xsd">
+<service-name>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ <local-part>FindInterest</local-part>
+ </service-name>
+ <endpoint-name>InterestIFPort</endpoint-name>
+ <endpoint-role>consumer</endpoint-role>
+ <address-location>http://localhost:8080/soap/web/findinterest</address-location>
+ <style>http://www.w3.org/2004/08/wsdl/style/rpc</style>
+ <operation>
+ <name>calculateInterest</name>
+ <mep>http://www.w3.org/2004/08/wsdl/in-out</mep>
+ <soapaction>""</soapaction>
+ <input>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ </input>
+ <output>
+ <namespace-uri>http://hello.org/wsdl</namespace-uri>
+ </output>
+ </operation>
+</endpoint>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/web/FindInterestServletImpl.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/web/FindInterestServletImpl.java
new file mode 100644
index 0000000..9fa9be9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/web/FindInterestServletImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 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 myweb;
+
+import java.util.Iterator;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.naming.*;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.namespace.QName;
+import javax.servlet.SingleThreadModel;
+
+public class FindInterestServletImpl implements
+ SingleThreadModel, ServiceLifecycle {
+
+ public FindInterestServletImpl() {
+ System.out.println("FindInterestServletImpl() instantiated");
+ }
+
+ public void init(Object context) {
+ System.out.println("Got ServiceLifecycle::init call " + context);
+ }
+
+ public void destroy() {
+ System.out.println("Got ServiceLifecycle::destroy call");
+ }
+
+ public double calculateInterest(double balance, double period) {
+ System.out.println("calculateInterest invoked from servlet endpoint");
+ return 0.2*balance*period;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config.xml
new file mode 100644
index 0000000..4cfb954
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_client.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_client.xml
new file mode 100644
index 0000000..ebff69c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myclient"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_web.xml
new file mode 100644
index 0000000..9d1e12f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jax-rpc/provider/wscompile_config_web.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="FindInterest.wsdl"
+ packageName="myweb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.properties
new file mode 100644
index 0000000..e128fe8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.properties
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2017, 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
+#
+
+<property name="jbi-installation" value="${env.S1AS_HOME}/jbi"/>
+<property name="jmx.port" value="4848"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.xml
new file mode 100644
index 0000000..02e8c57
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/jbi_commons.xml
@@ -0,0 +1,113 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <target name="deploy-jbi-component-su" depends="init-common">
+ <antcall target="deploy-service-assembly"/>
+ <antcall target="start-service-assembly"/>
+ </target>
+ <target name="start-service-assembly" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target=
+"start-service-assembly">
+ <property name="jbi.service.assembly.name" value="${jbi-component-su-assembly}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ </ant>
+ </target>
+ <target name="deploy-service-assembly" depends="init-common">
+ <property name="base-dir" value="."/>
+ <property name="temp" value="${base-dir}/temp" />
+ <property name="su-dir" value="${base-dir}/${jbi-component-su-dir}"/>
+ <mkdir dir="${temp}"/>
+ <jar basedir="${su-dir}/su" destfile="${temp}/${jbi-component-su}.jar"/>
+ <copy todir="${temp}">
+ <fileset dir="${su-dir}/assembly"/>
+ </copy>
+
+ <zip destfile="${assemble.dir}/${jbi-component-su-assembly}.zip" basedir="${temp}"/>
+ <delete dir="${temp}"/>
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target=
+"deploy-service-assembly">
+ <property name="jbi.deploy.file" value="${assemble.dir}/${jbi-component-su-assembly}.zip"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ </ant>
+ </target>
+<target name="undeploy-jbi-component-su" depends="init-common">
+ <antcall target="stop-service-assembly"/>
+ <antcall target="shut-down-service-assembly"/>
+ <antcall target="undeploy-service-assembly"/>
+ </target>
+
+ <target name="stop-service-assembly" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target=
+"stop-service-assembly">
+ <property name="jbi.service.assembly.name" value="${jbi-component-su-assembly}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ </ant>
+ </target>
+ <target name="shut-down-service-assembly" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target=
+"shut-down-service-assembly">
+ <property name="jbi.service.assembly.name" value="${jbi-component-su-assembly}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ </ant>
+ </target>
+ <target name="undeploy-service-assembly" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target=
+"undeploy-service-assembly">
+ <property name="jbi.service.assembly.name" value="${jbi-component-su-assembly}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ </ant>
+ </target>
+ <target name="stop-binding" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target="stop-component">
+ <property name="jbi.component.name" value="${jbi.component.name}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ <property name="jbi.task.fail.on.error" value="true"/>
+ </ant>
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target="shut-down-component">
+ <property name="jbi.component.name" value="${jbi.component.name}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ <property name="jbi.task.fail.on.error" value="true"/>
+ </ant>
+ </target>
+ <target name="start-binding" depends="init-common">
+ <ant dir="${jbi-installation}/bin" antfile="${jbi-installation}/bin/jbi_admin.xml" target="start-component">
+ <property name="jbi.component.name" value="${jbi.component.name}"/>
+ <property name="jbi.port" value="${jmx.port}"/>
+ <property name="jbi.task.fail.on.error" value="true"/>
+ </ant>
+ </target>
+
+ <!--
+ Arguments to this target are-
+ appName - application name
+ wsName - web service name
+ module - ejb-module|web-module|j2ee-application.ejb-module|j2ee-application.web-module
+ flag - true|false
+ -->
+ <target name="set-jbi-enabled" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appName}#${wsName}"/>
+ </antcall>
+ <echo message="calling asadmin set server.applications.${module}.${appName}.web-service-endpoint.${wsName}.jbi-enabled=${flag}"/>
+
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.${module}.${appName}.web-service-endpoint.${wsName}.jbi-enabled=${flag}"/>
+ </antcall>
+ </target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/README
new file mode 100644
index 0000000..f6a8de2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/README
@@ -0,0 +1,9 @@
+This is a one way message exchage sample.
+
+This sample exercises JavaEE SE as both Consumer & Provider.
+
+Execution path:
+
+ Client <-----> Servlet <-----> Java SE Consumer <---> NMR <----> Java SE Provider <---> EndPoint
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.properties
new file mode 100644
index 0000000..579dec6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_oneway_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_oneway_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.xml
new file mode 100644
index 0000000..a2e7360
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/build.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/OneWayService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/OneWayService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.OneWay.jbi-enabled=true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <!--<antcall target="undeploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#OneWay"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-sun-web.xml
new file mode 100644
index 0000000..35e6a8a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/oneway</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/OneWay</namespaceURI>
+ <localpart>OneWayPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.oneway.OneWay</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client/TestClient.java
new file mode 100644
index 0000000..d7662ef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/client/TestClient.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/oneway";
+ public boolean found1 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ //for(int i=0; i<100; i++) {
+ int code = invokeServlet(url);
+ report(code);
+ //}
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ //if(line.indexOf("Exception thrown Successfully") != -1)
+ if(line.indexOf("Endpoint is invoked successfully") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/endpoint/OneWay.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/endpoint/OneWay.java
new file mode 100644
index 0000000..fb2a39e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/endpoint/OneWay.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="OneWay",
+ serviceName="OneWayService",
+ targetNamespace="http://example.web.service/OneWay"
+)
+public class OneWay {
+ public OneWay() {}
+
+ @WebMethod(operationName="subtract", action="urn:Subtract")
+ @Oneway
+ public void subtract(int i, int j) {
+ System.out.println("*** Inside subtract("+i+", "+j+")");
+ int k = i -j ;
+ if(i == 101)
+ throw new RuntimeException("This is my exception in subtract ...");
+ }
+
+ @WebMethod(operationName="sayHi", action="urn:SayHi")
+ @Oneway
+ public void sayHi() {
+ System.out.println("*** Hi from OneWay");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..9587376
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_oneway_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_oneway</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_oneway_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..3dd399d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/OneWay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/OneWay" name="OneWayService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/OneWay" schemaLocation="OneWayService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="subtract">
+ <part name="parameters" element="tns:subtract"/>
+ </message>
+ <portType name="OneWay">
+ <operation name="subtract">
+ <input message="tns:subtract"/>
+ </operation>
+ </portType>
+ <binding name="OneWayPortBinding" type="tns:OneWay">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="subtract">
+ <soap:operation soapAction="urn:Subtract"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+ <service name="OneWayService">
+ <port name="OneWayPort" binding="tns:OneWayPortBinding">
+ <soap:address location="http://localhost.localdomain:8080/calc-web-client/webservice/OneWayService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..443882a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/OneWay" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="subtract" type="ns1:subtract" xmlns:ns1="http://example.web.service/OneWay"/>
+
+ <xs:complexType name="subtract">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..5350f5e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/OneWay"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:OneWayServiceInterface"
+ service-name="tns:OneWayService"
+ endpoint-name="OneWayPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..27b0432
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="OneWayPort" service="{http://example.web.service/OneWay}OneWayService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/web.xml
new file mode 100644
index 0000000..226f654
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the OneWay Service</description>
+ <display-name>OneWayWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for OneWay Web Service</description>
+ <display-name>OneWayWebService</display-name>
+ <servlet-name>OneWay</servlet-name>
+ <servlet-class>endpoint.OneWay</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>OneWay</servlet-name>
+ <url-pattern>/webservice/OneWayService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/webclient/client/Client.java
new file mode 100644
index 0000000..ffe2cb5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/oneway/webclient/client/Client.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.oneway.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/oneway") OneWayService service;
+ //static OneWay port;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ OneWay port = service.getOneWayPort();
+ //if (port == null) port = service.getOneWayPort();
+ System.out.println("port is : " + port);
+ port.subtract(101, 2);
+ port.sayHi();
+ printSuccess(out);
+ } catch(java.lang.Exception e) {
+ e.printStackTrace();
+ printFailure(out);
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Endpoint invocation failed.");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Endpoint is invoked successfully.");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/report.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/report.xml
new file mode 100644
index 0000000..65a32ae
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/report.xml
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/resultCount.sh b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/resultCount.sh
new file mode 100644
index 0000000..1fa7e14
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2017, 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
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=30
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN`
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+date>>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
+echo "************************">>$APS_HOME/devtests/webservice/jbi-serviceengine/count.txt;
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/README
new file mode 100644
index 0000000..a79e5d8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/README
@@ -0,0 +1,11 @@
+This is a test case to test RPC/Literal style operations with the bundled WSDL.
+
+The test case uses:
+------------------
+
+HTTP SOAP BC as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.properties
new file mode 100644
index 0000000..91ad899
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpc-literal-bundled-wsdl-bc-consumer-se-provider"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.xml
new file mode 100644
index 0000000..2e56421
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/build.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="common:endpoint"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="common:endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <!-- Add the WSDL -->
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService_schema1.xsd" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService.wsdl" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="WEB-INF/wsdl/CalculatorService_schema1.xsd"/>
+ <include name="WEB-INF/wsdl/CalculatorService.wsdl"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+ <target name="runtest" depends="init-common">
+ <echo message="Running SOAP Binding client"/>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ </antcall>
+ </target>
+
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..0cd865d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/client/SOAPWebConsumer.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import service.web.example.calculator.*;
+import javax.xml.ws.*;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/rpc-literal-bundled-wsdl-bc-consumer-se-provider/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/rpc-literal/bc_consumer_sc_provider/bundled-wsdl";
+
+ public static void main(String[] args) {
+ stat.addDescription(testId);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer();
+ stat.printSummary(testId);
+ }
+
+ private void addUsingSOAPConsumer() {
+ Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+
+ IncomeTaxDetails itDetails = new IncomeTaxDetails();
+ itDetails.setFirstName( "bhavani");
+ itDetails.setLastName("s");
+ itDetails.setAnnualIncome( 400000);
+ itDetails.setStatus("salaried");
+
+ long startTime = System.currentTimeMillis();
+ long ret = 0;
+ // Make 100 calls to see how much time it takes.
+ //for(int i=0; i<1000; i++) {
+ ret = port.calculateIncomeTax(itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ );
+ //}
+ long timeTaken = System.currentTimeMillis() - startTime;
+
+ //int ret = port.add(1, 2);
+ printSuccess("Your income tax is : Rs ", ret, timeTaken);
+ startTime = System.currentTimeMillis();
+ int k = port.add(505, 50);
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Sum of 505 and 50 is : ", k, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ String hi = port.sayHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Output from webservice : ", hi, timeTaken);
+
+ /*
+ startTime = System.currentTimeMillis();
+ port.printHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", "Webservice has successfully printed hi in server.log", timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHiToMe("JavaEEServiceEngine");
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", "Webservice has successfully printed hi to me in server.log", timeTaken);
+ */
+ stat.addStatus(testId, stat.PASS);
+
+ } catch(java.lang.Exception e) {
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+
+ public void printFailure(String errMsg) {
+ System.out.println("<html>");
+ System.out.println("<head>");
+ System.out.println("<title>TestServlet</title>");
+ System.out.println("</head>");
+ System.out.println("<body>");
+ System.out.println("<p>");
+ System.out.println("Test FAILED: Error message - " + errMsg);
+ System.out.println("</p>");
+ System.out.println("</body>");
+ System.out.println("</html>");
+ }
+
+ public void printSuccess(String message, long result, long timeTaken) {
+ System.out.println("\n\n");
+ System.out.println(message + result);
+ System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+ public void printSuccess(String message, String result, long timeTaken) {
+ System.out.println("\n\n");
+ System.out.println(message + result);
+ System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/common/IncomeTaxDetails.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/common/IncomeTaxDetails.java
new file mode 100644
index 0000000..57b00e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/common/IncomeTaxDetails.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 common;
+
+public class IncomeTaxDetails {
+ public String firstName;
+ public String lastName;
+ public String status; // salaried, self-employed, student.
+ public long annualIncome;
+}
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/endpoint/Calculator.java
new file mode 100644
index 0000000..ee659a1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/endpoint/Calculator.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import common.IncomeTaxDetails;
+
+@WebService(
+name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator",
+ wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl"
+ )
+ @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
+
+ public class Calculator {
+
+ public static final String testName = "\nTest :: rpc-literal-bundled-wsdl-bc-consumer-se-provider : ";
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(
+ @WebParam(name = "int_1", partName = "int_1") int i,
+ @WebParam(name = "int_2", partName = "int_2") int j
+ ) throws Exception {
+ int k = i +j ;
+ System.out.println(testName + i + "+" + j +" = " + k);
+ return k;
+ }
+
+ @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax")
+ public long calculateIncomeTax(IncomeTaxDetails details
+ , IncomeTaxDetails details2
+ , IncomeTaxDetails details3
+ , IncomeTaxDetails details4
+ , IncomeTaxDetails details5
+ , IncomeTaxDetails details6
+ , IncomeTaxDetails details7
+ , IncomeTaxDetails details8
+ , IncomeTaxDetails details9
+ , IncomeTaxDetails details10
+ ) {
+ long income = details.annualIncome;
+ System.out.println(testName + "Annual income = " + income);
+ long taxRate = 30; // 30%
+ long taxToBePaid = income / taxRate;
+ System.out.println(testName +"Tax to be paid = " + taxToBePaid);
+ return taxToBePaid;
+ }
+
+ @WebMethod(operationName="sayHi", action="urn:SayHi")
+ public String sayHi() {
+ return testName + "Hi from sayHi()";
+ }
+
+ @WebMethod(operationName="printHi", action="urn:PrintHi")
+ @Oneway
+ public void printHi() {
+ System.out.println(testName +"Hi from printHi()");
+ }
+
+ @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe")
+ @Oneway
+ public void printHiToMe(String name) {
+ System.out.println(testName +"Hi to " + name + " from printHiToMe()");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..b4da986
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..f59836b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="calculateIncomeTax">
+ <part name="arg0" type="tns:incomeTaxDetails"/>
+ <part name="arg1" type="tns:incomeTaxDetails"/>
+ <part name="arg2" type="tns:incomeTaxDetails"/>
+ <part name="arg3" type="tns:incomeTaxDetails"/>
+ <part name="arg4" type="tns:incomeTaxDetails"/>
+ <part name="arg5" type="tns:incomeTaxDetails"/>
+ <part name="arg6" type="tns:incomeTaxDetails"/>
+ <part name="arg7" type="tns:incomeTaxDetails"/>
+ <part name="arg8" type="tns:incomeTaxDetails"/>
+ <part name="arg9" type="tns:incomeTaxDetails"/>
+ </message>
+ <message name="calculateIncomeTaxResponse">
+ <part name="return" type="xsd:long"/>
+ </message>
+ <message name="sayHi"/>
+ <message name="sayHiResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="printHi"/>
+ <message name="printHiResponse"/>
+ <message name="printHiToMe">
+ <part name="arg0" type="xsd:string"/>
+ </message>
+ <message name="printHiToMeResponse"/>
+ <message name="add">
+ <part name="int_1" type="xsd:int"/>
+ <part name="int_2" type="xsd:int"/>
+ </message>
+ <message name="addResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="calculateIncomeTax" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9">
+ <input name="calculateIncomeTax" message="tns:calculateIncomeTax"/>
+ <output name="calculateIncomeTaxResponse" message="tns:calculateIncomeTaxResponse"/>
+ </operation>
+ <operation name="sayHi" parameterOrder="">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ <operation name="printHi" parameterOrder="">
+ <input name="printHi" message="tns:printHi"/>
+ <output name="printHiResponse" message="tns:printHiResponse"/>
+ </operation>
+ <operation name="printHiToMe" parameterOrder="arg0">
+ <input name="printHiToMe" message="tns:printHiToMe"/>
+ <output name="printHiToMeResponse" message="tns:printHiToMeResponse"/>
+ </operation>
+ <operation name="add" parameterOrder="int_1 int_2">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="calculateIncomeTax">
+ <soap:operation soapAction="urn:CalculateIncomeTax"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="sayHi">
+ <soap:operation soapAction="urn:SayHi"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHi">
+ <soap:operation soapAction="urn:PrintHi"/>
+ <input name="printHi">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output name="printHiResponse">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHiToMe">
+ <soap:operation soapAction="urn:PrintHiToMe"/>
+ <input name="printHiToMe">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..bb5ebd9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:tns="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="addResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTax" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTaxResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMe" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMeResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="incomeTaxDetails">
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string" minOccurs="0"/>
+ <xs:element name="lastName" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ <xs:element name="annualIncome" type="xs:long"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..81c5309
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..6b6593f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService.wsdl
new file mode 100644
index 0000000..80efa77
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="calculateIncomeTax">
+ <part name="arg0" type="tns:incomeTaxDetails"/>
+ <part name="arg1" type="tns:incomeTaxDetails"/>
+ <part name="arg2" type="tns:incomeTaxDetails"/>
+ <part name="arg3" type="tns:incomeTaxDetails"/>
+ <part name="arg4" type="tns:incomeTaxDetails"/>
+ <part name="arg5" type="tns:incomeTaxDetails"/>
+ <part name="arg6" type="tns:incomeTaxDetails"/>
+ <part name="arg7" type="tns:incomeTaxDetails"/>
+ <part name="arg8" type="tns:incomeTaxDetails"/>
+ <part name="arg9" type="tns:incomeTaxDetails"/>
+ </message>
+ <message name="calculateIncomeTaxResponse">
+ <part name="return" type="xsd:long"/>
+ </message>
+ <message name="sayHi"/>
+ <message name="sayHiResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="printHi"/>
+ <message name="printHiResponse"/>
+ <message name="printHiToMe">
+ <part name="arg0" type="xsd:string"/>
+ </message>
+ <message name="printHiToMeResponse"/>
+ <message name="add">
+ <part name="int_1" type="xsd:int"/>
+ <part name="int_2" type="xsd:int"/>
+ </message>
+ <message name="addResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="calculateIncomeTax" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9">
+ <input name="calculateIncomeTax" message="tns:calculateIncomeTax"/>
+ <output name="calculateIncomeTaxResponse" message="tns:calculateIncomeTaxResponse"/>
+ </operation>
+ <operation name="sayHi" parameterOrder="">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ <operation name="printHi" parameterOrder="">
+ <input name="printHi" message="tns:printHi"/>
+ <output name="printHiResponse" message="tns:printHiResponse"/>
+ </operation>
+ <operation name="printHiToMe" parameterOrder="arg0">
+ <input name="printHiToMe" message="tns:printHiToMe"/>
+ <output name="printHiToMeResponse" message="tns:printHiToMeResponse"/>
+ </operation>
+ <operation name="add" parameterOrder="int_1 int_2">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="calculateIncomeTax">
+ <soap:operation soapAction="urn:CalculateIncomeTax"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="sayHi">
+ <soap:operation soapAction="urn:SayHi"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHi">
+ <soap:operation soapAction="urn:PrintHi"/>
+ <input name="printHi">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output name="printHiResponse">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHiToMe">
+ <soap:operation soapAction="urn:PrintHiToMe"/>
+ <input name="printHiToMe">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://sholay.india.sun.com:8080/rpc-literal-bundled-wsdl/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..d06b5bb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/bundled-wsdl/wsdl/CalculatorService_schema1.xsd
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:tns="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="addResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTax" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTaxResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMe" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMeResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="incomeTaxDetails">
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string" minOccurs="0"/>
+ <xs:element name="lastName" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ <xs:element name="annualIncome" type="xs:long"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/README
new file mode 100644
index 0000000..fad576e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/README
@@ -0,0 +1,11 @@
+This is a test case to test RPC/Literal style operations with one WSDL importing another WSDL.
+
+The test case uses:
+------------------
+
+HTTP SOAP BC as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> HTTP SOAP BC <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.properties
new file mode 100644
index 0000000..1060c7a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpc-literal-bundled-wsdl-bc-consumer-se-provider"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="sun-http-binding"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.xml
new file mode 100644
index 0000000..2d4c393
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/build.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="common:endpoint"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="common:endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <!-- Add the WSDL -->
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService_schema1.xsd" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService.wsdl" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/MessageTypes.wsdl" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="WEB-INF/wsdl/CalculatorService_schema1.xsd"/>
+ <include name="WEB-INF/wsdl/CalculatorService.wsdl"/>
+ <include name="WEB-INF/wsdl/MessageTypes.wsdl"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+ <target name="runtest" depends="init-common">
+ <echo message="Running SOAP Binding client"/>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ </antcall>
+ </target>
+
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..6a66a3b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/client/SOAPWebConsumer.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import service.web.example.calculator.*;
+import javax.xml.ws.*;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/rpc-literal-bundled-wsdl-bc-consumer-se-provider/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/rpc-literal/bc_consumer_sc_provider/wsdl-import";
+
+ public static void main(String[] args) {
+ stat.addDescription(testId);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer();
+ stat.printSummary(testId);
+ }
+
+ private void addUsingSOAPConsumer() {
+ Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+
+ IncomeTaxDetails itDetails = new IncomeTaxDetails();
+ itDetails.setFirstName( "bhavani");
+ itDetails.setLastName("s");
+ itDetails.setAnnualIncome( 400000);
+ itDetails.setStatus("salaried");
+
+ long startTime = System.currentTimeMillis();
+ long ret = 0;
+ // Make 100 calls to see how much time it takes.
+ //for(int i=0; i<1000; i++) {
+ ret = port.calculateIncomeTax(itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ );
+ //}
+ long timeTaken = System.currentTimeMillis() - startTime;
+
+ //int ret = port.add(1, 2);
+ printSuccess("Your income tax is : Rs ", ret, timeTaken);
+ startTime = System.currentTimeMillis();
+ int k = port.add(505, 50);
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Sum of 505 and 50 is : ", k, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ String hi = port.sayHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Output from webservice : ", hi, timeTaken);
+
+ /*
+ startTime = System.currentTimeMillis();
+ port.printHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", "Webservice has successfully printed hi in server.log", timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHiToMe("JavaEEServiceEngine");
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", "Webservice has successfully printed hi to me in server.log", timeTaken);
+ */
+ stat.addStatus(testId, stat.PASS);
+
+ } catch(java.lang.Exception e) {
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+
+ public void printFailure(String errMsg) {
+ System.out.println("<html>");
+ System.out.println("<head>");
+ System.out.println("<title>TestServlet</title>");
+ System.out.println("</head>");
+ System.out.println("<body>");
+ System.out.println("<p>");
+ System.out.println("Test FAILED: Error message - " + errMsg);
+ System.out.println("</p>");
+ System.out.println("</body>");
+ System.out.println("</html>");
+ }
+
+ public void printSuccess(String message, long result, long timeTaken) {
+ System.out.println("\n\n");
+ System.out.println(message + result);
+ System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+ public void printSuccess(String message, String result, long timeTaken) {
+ System.out.println("\n\n");
+ System.out.println(message + result);
+ System.out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/common/IncomeTaxDetails.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/common/IncomeTaxDetails.java
new file mode 100644
index 0000000..57b00e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/common/IncomeTaxDetails.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 common;
+
+public class IncomeTaxDetails {
+ public String firstName;
+ public String lastName;
+ public String status; // salaried, self-employed, student.
+ public long annualIncome;
+}
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/endpoint/Calculator.java
new file mode 100644
index 0000000..ee659a1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/endpoint/Calculator.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import common.IncomeTaxDetails;
+
+@WebService(
+name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator",
+ wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl"
+ )
+ @SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
+
+ public class Calculator {
+
+ public static final String testName = "\nTest :: rpc-literal-bundled-wsdl-bc-consumer-se-provider : ";
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(
+ @WebParam(name = "int_1", partName = "int_1") int i,
+ @WebParam(name = "int_2", partName = "int_2") int j
+ ) throws Exception {
+ int k = i +j ;
+ System.out.println(testName + i + "+" + j +" = " + k);
+ return k;
+ }
+
+ @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax")
+ public long calculateIncomeTax(IncomeTaxDetails details
+ , IncomeTaxDetails details2
+ , IncomeTaxDetails details3
+ , IncomeTaxDetails details4
+ , IncomeTaxDetails details5
+ , IncomeTaxDetails details6
+ , IncomeTaxDetails details7
+ , IncomeTaxDetails details8
+ , IncomeTaxDetails details9
+ , IncomeTaxDetails details10
+ ) {
+ long income = details.annualIncome;
+ System.out.println(testName + "Annual income = " + income);
+ long taxRate = 30; // 30%
+ long taxToBePaid = income / taxRate;
+ System.out.println(testName +"Tax to be paid = " + taxToBePaid);
+ return taxToBePaid;
+ }
+
+ @WebMethod(operationName="sayHi", action="urn:SayHi")
+ public String sayHi() {
+ return testName + "Hi from sayHi()";
+ }
+
+ @WebMethod(operationName="printHi", action="urn:PrintHi")
+ @Oneway
+ public void printHi() {
+ System.out.println(testName +"Hi from printHi()");
+ }
+
+ @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe")
+ @Oneway
+ public void printHiToMe(String name) {
+ System.out.println(testName +"Hi to " + name + " from printHiToMe()");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..b4da986
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl
new file mode 100644
index 0000000..f59836b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="calculateIncomeTax">
+ <part name="arg0" type="tns:incomeTaxDetails"/>
+ <part name="arg1" type="tns:incomeTaxDetails"/>
+ <part name="arg2" type="tns:incomeTaxDetails"/>
+ <part name="arg3" type="tns:incomeTaxDetails"/>
+ <part name="arg4" type="tns:incomeTaxDetails"/>
+ <part name="arg5" type="tns:incomeTaxDetails"/>
+ <part name="arg6" type="tns:incomeTaxDetails"/>
+ <part name="arg7" type="tns:incomeTaxDetails"/>
+ <part name="arg8" type="tns:incomeTaxDetails"/>
+ <part name="arg9" type="tns:incomeTaxDetails"/>
+ </message>
+ <message name="calculateIncomeTaxResponse">
+ <part name="return" type="xsd:long"/>
+ </message>
+ <message name="sayHi"/>
+ <message name="sayHiResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="printHi"/>
+ <message name="printHiResponse"/>
+ <message name="printHiToMe">
+ <part name="arg0" type="xsd:string"/>
+ </message>
+ <message name="printHiToMeResponse"/>
+ <message name="add">
+ <part name="int_1" type="xsd:int"/>
+ <part name="int_2" type="xsd:int"/>
+ </message>
+ <message name="addResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="calculateIncomeTax" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9">
+ <input name="calculateIncomeTax" message="tns:calculateIncomeTax"/>
+ <output name="calculateIncomeTaxResponse" message="tns:calculateIncomeTaxResponse"/>
+ </operation>
+ <operation name="sayHi" parameterOrder="">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ <operation name="printHi" parameterOrder="">
+ <input name="printHi" message="tns:printHi"/>
+ <output name="printHiResponse" message="tns:printHiResponse"/>
+ </operation>
+ <operation name="printHiToMe" parameterOrder="arg0">
+ <input name="printHiToMe" message="tns:printHiToMe"/>
+ <output name="printHiToMeResponse" message="tns:printHiToMeResponse"/>
+ </operation>
+ <operation name="add" parameterOrder="int_1 int_2">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="calculateIncomeTax">
+ <soap:operation soapAction="urn:CalculateIncomeTax"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="sayHi">
+ <soap:operation soapAction="urn:SayHi"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHi">
+ <soap:operation soapAction="urn:PrintHi"/>
+ <input name="printHi">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output name="printHiResponse">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHiToMe">
+ <soap:operation soapAction="urn:PrintHiToMe"/>
+ <input name="printHiToMe">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..bb5ebd9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/CalculatorService_schema1.xsd
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:tns="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="addResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTax" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTaxResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMe" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMeResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="incomeTaxDetails">
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string" minOccurs="0"/>
+ <xs:element name="lastName" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ <xs:element name="annualIncome" type="xs:long"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml
new file mode 100755
index 0000000..81c5309
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/endpoints.xml
new file mode 100755
index 0000000..6b6593f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/sun-http-binding/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService.wsdl
new file mode 100644
index 0000000..8024780
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService.wsdl
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <import location="MessageTypes.wsdl" namespace="http://example.web.service/Calculator"/>
+ <types/>
+ <portType name="Calculator">
+ <operation name="calculateIncomeTax" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9">
+ <input name="calculateIncomeTax" message="tns:calculateIncomeTax"/>
+ <output name="calculateIncomeTaxResponse" message="tns:calculateIncomeTaxResponse"/>
+ </operation>
+ <operation name="sayHi" parameterOrder="">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ <operation name="printHi" parameterOrder="">
+ <input name="printHi" message="tns:printHi"/>
+ <output name="printHiResponse" message="tns:printHiResponse"/>
+ </operation>
+ <operation name="printHiToMe" parameterOrder="arg0">
+ <input name="printHiToMe" message="tns:printHiToMe"/>
+ <output name="printHiToMeResponse" message="tns:printHiToMeResponse"/>
+ </operation>
+ <operation name="add" parameterOrder="int_1 int_2">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="calculateIncomeTax">
+ <soap:operation soapAction="urn:CalculateIncomeTax"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="sayHi">
+ <soap:operation soapAction="urn:SayHi"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHi">
+ <soap:operation soapAction="urn:PrintHi"/>
+ <input name="printHi">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output name="printHiResponse">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHiToMe">
+ <soap:operation soapAction="urn:PrintHiToMe"/>
+ <input name="printHiToMe">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://sholay.india.sun.com:8080/rpc-literal-bundled-wsdl/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..d06b5bb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/CalculatorService_schema1.xsd
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:tns="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="addResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTax" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTaxResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMe" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMeResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="incomeTaxDetails">
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string" minOccurs="0"/>
+ <xs:element name="lastName" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ <xs:element name="annualIncome" type="xs:long"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/MessageTypes.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/MessageTypes.wsdl
new file mode 100644
index 0000000..84228b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/bc_consumer_sc_provider/wsdl-import/wsdl/MessageTypes.wsdl
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="calculateIncomeTax">
+ <part name="arg0" type="tns:incomeTaxDetails"/>
+ <part name="arg1" type="tns:incomeTaxDetails"/>
+ <part name="arg2" type="tns:incomeTaxDetails"/>
+ <part name="arg3" type="tns:incomeTaxDetails"/>
+ <part name="arg4" type="tns:incomeTaxDetails"/>
+ <part name="arg5" type="tns:incomeTaxDetails"/>
+ <part name="arg6" type="tns:incomeTaxDetails"/>
+ <part name="arg7" type="tns:incomeTaxDetails"/>
+ <part name="arg8" type="tns:incomeTaxDetails"/>
+ <part name="arg9" type="tns:incomeTaxDetails"/>
+ </message>
+ <message name="calculateIncomeTaxResponse">
+ <part name="return" type="xsd:long"/>
+ </message>
+ <message name="sayHi"/>
+ <message name="sayHiResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="printHi"/>
+ <message name="printHiResponse"/>
+ <message name="printHiToMe">
+ <part name="arg0" type="xsd:string"/>
+ </message>
+ <message name="printHiToMeResponse"/>
+ <message name="add">
+ <part name="int_1" type="xsd:int"/>
+ <part name="int_2" type="xsd:int"/>
+ </message>
+ <message name="addResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/build.xml
new file mode 100644
index 0000000..90d05e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/build.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="service_unit" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="se_consumer_se_provider/generated_wsdl" target="all"/>
+ <ant dir="se_consumer_se_provider/bundled_wsdl" target="all"/>
+ <ant dir="bc_consumer_sc_provider/wsdl-import" target="all"/>
+ <ant dir="bc_consumer_sc_provider/bundled-wsdl" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/README
new file mode 100644
index 0000000..d7c90e0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/README
@@ -0,0 +1,11 @@
+This is a test case to test RPC/Literal style operations with the bundled WSDL.
+
+The test case uses:
+------------------
+
+Java EE Service Engine as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties
new file mode 100644
index 0000000..849c555
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpc-literal-bundled-wsdl"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="rpc-literal-bundled-wsdl-se-consumer-se-provider"/>
+<property name="jbi-component-su" value="client_web_calculator_su"/>
+<property name="jbi-component-su-dir" value="javaee-se-serviceunit"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml
new file mode 100644
index 0000000..87c424a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/build.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${jbi-component-su-dir}/assembly/${appname}-web.war"/>
+ <delete file="${basedir}/RepRunConf.txt"/>
+ <delete dir="${basedir}/common:endpoint"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-jbi-component-su,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="common:endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}-web.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <!-- Add META-INF/jbi.xml to .war file -->
+ <mkdir dir="${build.classes.dir}/tmp/META-INF"/>
+ <echo message="created dir = ${build.classes.dir}/tmp/META-INF"/>
+ <copy file="${jbi-component-su-dir}/su/META-INF/jbi.xml" tofile="${build.classes.dir}/tmp/META-INF/jbi.xml"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="META-INF/jbi.xml"/>
+ </fileset>
+ </jar>
+
+ <!-- Add the WSDL -->
+ <mkdir dir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService_schema1.xsd" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <copy file="${basedir}/wsdl/CalculatorService.wsdl" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="WEB-INF/wsdl/CalculatorService_schema1.xsd"/>
+ <include name="WEB-INF/wsdl/CalculatorService.wsdl"/>
+ </fileset>
+ </jar>
+
+ <!-- Copy the JavaEE app to the service assembly -->
+ <copy file="${assemble.dir}/${appname}-web.war" todir="${jbi-component-su-dir}/assembly"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-bundled-wsdl/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-bundled-wsdl/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar"
+ includes="common/**,webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="common/**,client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java
new file mode 100644
index 0000000..4296a7f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/client/TestClient.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/rpc-literal/se_consumer_se_provider/bundled_wsdl";
+
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ StringBuffer buffer = new StringBuffer();
+ String line = null;
+ boolean found = false;
+ while ((line = input.readLine()) != null) {
+ if(line.indexOf("SUCCESS") != -1) found = true;
+ buffer.append(line + "\n");
+ }
+ log(buffer.toString());
+ if(!found) return 505;
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java
new file mode 100644
index 0000000..57b00e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/common/IncomeTaxDetails.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 common;
+
+public class IncomeTaxDetails {
+ public String firstName;
+ public String lastName;
+ public String status; // salaried, self-employed, student.
+ public long annualIncome;
+}
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java
new file mode 100644
index 0000000..4b737f8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/endpoint/Calculator.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import common.IncomeTaxDetails;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator",
+ wsdlLocation = "WEB-INF/wsdl/CalculatorService.wsdl"
+ )
+@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
+
+public class Calculator {
+
+ public static final String testName = "\nTest :: rpc-literal-bundled-wsdl : ";
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(
+ @WebParam(name = "int_1", partName = "int_1") int i,
+ @WebParam(name = "int_2", partName = "int_2") int j
+ ) throws Exception {
+ int k = i +j ;
+ System.out.println(testName + i + "+" + j +" = " + k);
+ return k;
+ }
+
+ @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax")
+ public long calculateIncomeTax(IncomeTaxDetails details
+ , IncomeTaxDetails details2
+ , IncomeTaxDetails details3
+ , IncomeTaxDetails details4
+ , IncomeTaxDetails details5
+ , IncomeTaxDetails details6
+ , IncomeTaxDetails details7
+ , IncomeTaxDetails details8
+ , IncomeTaxDetails details9
+ , IncomeTaxDetails details10
+ ) {
+ long income = details.annualIncome;
+ System.out.println(testName + "Annual income = " + income);
+ long taxRate = 30; // 30%
+ long taxToBePaid = income / taxRate;
+ System.out.println(testName +"Tax to be paid = " + taxToBePaid);
+ return taxToBePaid;
+ }
+
+ @WebMethod(operationName="sayHi", action="urn:SayHi")
+ public String sayHi() {
+ return testName + "Hi from sayHi()";
+ }
+
+ @WebMethod(operationName="printHi", action="urn:PrintHi")
+ public void printHi() {
+ System.out.println(testName +"Hi from printHi()");
+ }
+
+ @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe")
+ public void printHiToMe(String name) {
+ System.out.println(testName +"Hi to " + name + " from printHiToMe()");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..1c0872c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/assembly/META-INF/jbi.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <name>rpc-literal-bundled-wsdl-se-consumer-se-provider</name>
+ <description>Client web calculator service assembly</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>rpc-literal-bundled-wsdl</name>
+ <description>provider service</description>
+ </identification>
+ <target>
+ <artifacts-zip>rpc-literal-bundled-wsdl-web.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml
new file mode 100755
index 0000000..9a201a0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/javaee-se-serviceunit/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml
new file mode 100644
index 0000000..833de52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/sun-web.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<context-root>rpc-literal-bundled-wsdl</context-root>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java
new file mode 100644
index 0000000..505e227
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/webclient/client/Client.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+//import common.IncomeTaxDetails;
+//import java.util.Hashtable;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Calculator port = service.getCalculatorPort();
+ IncomeTaxDetails itDetails = new IncomeTaxDetails();
+ itDetails.setFirstName ( "bhavani");
+ itDetails.setLastName ("s");
+ itDetails.setAnnualIncome ( 400000);
+ itDetails.setStatus ("salaried");
+
+ long startTime = System.currentTimeMillis();
+ long ret = 0;
+ // Make 100 calls to see how much time it takes.
+ //for(int i=0; i<1000; i++) {
+ ret = port.calculateIncomeTax(itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ );
+ //}
+ long timeTaken = System.currentTimeMillis() - startTime;
+
+ //int ret = port.add(1, 2);
+ printSuccess("Your income tax is : Rs ", out,ret, timeTaken);
+ startTime = System.currentTimeMillis();
+ int k = port.add(505, 50);
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Sum of 505 and 50 is : ", out,k, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ String hi = port.sayHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Output from webservice : ", out, hi, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi in server.log", timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHiToMe("JavaEEServiceEngine");
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi to me in server.log", timeTaken);
+
+ } catch(java.lang.Exception e) {
+ //e.printStackTrace();
+ printFailure(out, e.getMessage());
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out, String errMsg) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: Error message - " + errMsg);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(String message, PrintWriter out, long result, long timeTaken) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+ public void printSuccess(String message, PrintWriter out, String result, long timeTaken) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl
new file mode 100644
index 0000000..80efa77
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="calculateIncomeTax">
+ <part name="arg0" type="tns:incomeTaxDetails"/>
+ <part name="arg1" type="tns:incomeTaxDetails"/>
+ <part name="arg2" type="tns:incomeTaxDetails"/>
+ <part name="arg3" type="tns:incomeTaxDetails"/>
+ <part name="arg4" type="tns:incomeTaxDetails"/>
+ <part name="arg5" type="tns:incomeTaxDetails"/>
+ <part name="arg6" type="tns:incomeTaxDetails"/>
+ <part name="arg7" type="tns:incomeTaxDetails"/>
+ <part name="arg8" type="tns:incomeTaxDetails"/>
+ <part name="arg9" type="tns:incomeTaxDetails"/>
+ </message>
+ <message name="calculateIncomeTaxResponse">
+ <part name="return" type="xsd:long"/>
+ </message>
+ <message name="sayHi"/>
+ <message name="sayHiResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+ <message name="printHi"/>
+ <message name="printHiResponse"/>
+ <message name="printHiToMe">
+ <part name="arg0" type="xsd:string"/>
+ </message>
+ <message name="printHiToMeResponse"/>
+ <message name="add">
+ <part name="int_1" type="xsd:int"/>
+ <part name="int_2" type="xsd:int"/>
+ </message>
+ <message name="addResponse">
+ <part name="return" type="xsd:int"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="calculateIncomeTax" parameterOrder="arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9">
+ <input name="calculateIncomeTax" message="tns:calculateIncomeTax"/>
+ <output name="calculateIncomeTaxResponse" message="tns:calculateIncomeTaxResponse"/>
+ </operation>
+ <operation name="sayHi" parameterOrder="">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ <operation name="printHi" parameterOrder="">
+ <input name="printHi" message="tns:printHi"/>
+ <output name="printHiResponse" message="tns:printHiResponse"/>
+ </operation>
+ <operation name="printHiToMe" parameterOrder="arg0">
+ <input name="printHiToMe" message="tns:printHiToMe"/>
+ <output name="printHiToMeResponse" message="tns:printHiToMeResponse"/>
+ </operation>
+ <operation name="add" parameterOrder="int_1 int_2">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="calculateIncomeTax">
+ <soap:operation soapAction="urn:CalculateIncomeTax"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="sayHi">
+ <soap:operation soapAction="urn:SayHi"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHi">
+ <soap:operation soapAction="urn:PrintHi"/>
+ <input name="printHi">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output name="printHiResponse">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="printHiToMe">
+ <soap:operation soapAction="urn:PrintHiToMe"/>
+ <input name="printHiToMe">
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ </operation>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://example.web.service/Calculator"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://sholay.india.sun.com:8080/rpc-literal-bundled-wsdl/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..d06b5bb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/bundled_wsdl/wsdl/CalculatorService_schema1.xsd
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:tns="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="addResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTax" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="calculateIncomeTaxResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMe" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="printHiToMeResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHi" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:element name="sayHiResponse" nillable="true">
+ <xs:complexType/>
+ </xs:element>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="incomeTaxDetails">
+ <xs:sequence>
+ <xs:element name="firstName" type="xs:string" minOccurs="0"/>
+ <xs:element name="lastName" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ <xs:element name="annualIncome" type="xs:long"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/README
new file mode 100644
index 0000000..cfddd22
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/README
@@ -0,0 +1,11 @@
+This is a test case to test RPC/Literal style operations with generated WSDL.
+
+The test case uses:
+------------------
+
+Java EE Service Engine as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties
new file mode 100644
index 0000000..198c549
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpc-literal-generated-wsdl"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_service_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_su"/>
+<property name="jbi-component-su-dir" value="javaee-se-serviceunit"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml
new file mode 100644
index 0000000..0c682b8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/build.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${jbi-component-su-dir}/assembly/${appname}-web.war"/>
+ <delete file="${basedir}/RepRunConf.txt"/>
+ <delete dir="${basedir}/common:endpoint"/>
+ </target>
+
+ <target name="setup" depends="clean, assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="common:endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}-web.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-generated-wsdl/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-generated-wsdl/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar"
+ includes="common/**, webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-web"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-web"/>
+ <param name="wsName" value="Calculator"/>
+ <param name="module" value="web-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-client"/>
+ <antcall target="undeploy-app"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="common/**, client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java
new file mode 100644
index 0000000..a94c08e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/client/TestClient.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/rpc-literal/se_consumer_se_provider/generated_wsdl";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ StringBuffer buffer = new StringBuffer();
+ String line = null;
+ boolean found = false;
+ while ((line = input.readLine()) != null) {
+ if(line.indexOf("SUCCESS") != -1) found = true;
+ buffer.append(line + "\n");
+ }
+ log(buffer.toString());
+ if(!found) return 505;
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java
new file mode 100644
index 0000000..57b00e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/common/IncomeTaxDetails.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 common;
+
+public class IncomeTaxDetails {
+ public String firstName;
+ public String lastName;
+ public String status; // salaried, self-employed, student.
+ public long annualIncome;
+}
+
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java
new file mode 100644
index 0000000..30ffdd2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/endpoint/Calculator.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+import common.IncomeTaxDetails;
+import java.util.Hashtable;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
+public class Calculator {
+
+ public static final String testName = "\nTest :: rpc-literal-generated-wsdl : ";
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(testName + i + "+" + j +" = " + k);
+ //throw new java.lang.Exception("This is my exception");
+ return k;
+ }
+
+ @WebMethod(operationName="calculateIncomeTax", action="urn:CalculateIncomeTax")
+ public long calculateIncomeTax(IncomeTaxDetails details
+ , IncomeTaxDetails details2
+ , IncomeTaxDetails details3
+ , IncomeTaxDetails details4
+ , IncomeTaxDetails details5
+ , IncomeTaxDetails details6
+ , IncomeTaxDetails details7
+ , IncomeTaxDetails details8
+ , IncomeTaxDetails details9
+ , IncomeTaxDetails details10
+ ) {
+ long income = details.annualIncome;
+ System.out.println(testName + "Annual income = " + income);
+ long taxRate = 30; // 30%
+ long taxToBePaid = income / taxRate;
+ System.out.println(testName +"Tax to be paid = " + taxToBePaid);
+ return taxToBePaid;
+ }
+
+ @WebMethod(operationName="sayHi", action="urn:SayHi")
+ public String sayHi() {
+ return testName + "Hi from sayHi()";
+ }
+
+ @WebMethod(operationName="printHi", action="urn:PrintHi")
+ public void printHi() {
+ System.out.println(testName +"Hi from printHi()");
+ }
+
+ @WebMethod(operationName="printHiToMe", action="urn:PrintHiToMe")
+ public void printHiToMe(String name) {
+ System.out.println(testName +"Hi to " + name + " from printHiToMe()");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java
new file mode 100644
index 0000000..505e227
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/rpc_literal/se_consumer_se_provider/generated_wsdl/webclient/client/Client.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+//import common.IncomeTaxDetails;
+//import java.util.Hashtable;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Calculator port = service.getCalculatorPort();
+ IncomeTaxDetails itDetails = new IncomeTaxDetails();
+ itDetails.setFirstName ( "bhavani");
+ itDetails.setLastName ("s");
+ itDetails.setAnnualIncome ( 400000);
+ itDetails.setStatus ("salaried");
+
+ long startTime = System.currentTimeMillis();
+ long ret = 0;
+ // Make 100 calls to see how much time it takes.
+ //for(int i=0; i<1000; i++) {
+ ret = port.calculateIncomeTax(itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ , itDetails
+ );
+ //}
+ long timeTaken = System.currentTimeMillis() - startTime;
+
+ //int ret = port.add(1, 2);
+ printSuccess("Your income tax is : Rs ", out,ret, timeTaken);
+ startTime = System.currentTimeMillis();
+ int k = port.add(505, 50);
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Sum of 505 and 50 is : ", out,k, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ String hi = port.sayHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("Output from webservice : ", out, hi, timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHi();
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi in server.log", timeTaken);
+
+ startTime = System.currentTimeMillis();
+ port.printHiToMe("JavaEEServiceEngine");
+ timeTaken = System.currentTimeMillis() - startTime;
+ printSuccess("SUCCESS : ", out, "Webservice has successfully printed hi to me in server.log", timeTaken);
+
+ } catch(java.lang.Exception e) {
+ //e.printStackTrace();
+ printFailure(out, e.getMessage());
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out, String errMsg) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: Error message - " + errMsg);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(String message, PrintWriter out, long result, long timeTaken) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+
+ public void printSuccess(String message, PrintWriter out, String result, long timeTaken) {
+ if(out == null) return;
+ out.println("\n\n");
+ out.println(message + result);
+ out.println("Time taken to invoke the endpoint operation is : " + timeTaken + " milliseconds.");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/README
new file mode 100644
index 0000000..3914cb4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/README
@@ -0,0 +1 @@
+This directory contains tests for the security feature of JavaEE service engine.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/build.xml
new file mode 100644
index 0000000..513121a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/build.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="javaee_se_security" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="jse_only" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/README
new file mode 100644
index 0000000..e070591
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/README
@@ -0,0 +1,12 @@
+It tests the security feature of JavaEE service engine. JavaEE SE is used on consumer as well as on the provider side.
+An EJB webservice is invoked by a servlet that requires authentication. This webservice method returns the caller principal associated with the invocation.
+A temporary file user is created in this test.
+
+Here is the invocation flow-
+
+1. Standalone client invokes the servlet after passing proper user credential.
+2. Apserver invokes the servlet with a Principal.
+3. Servlet calls the EJB webservice.
+4. EJB webservice returns the caller principal associated with the EJBContext.
+5. Servlet sends the returned value of EJB webservice in the response.
+6. Client checks whether the returned principal matches with the one it was invoked.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.properties
new file mode 100644
index 0000000..04aed80
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="secured-ejbWS"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="fileUser" value="user"/>
+<property name="fileUserPassword" value="user123"/>
+<property name="fileUserGroups" value="test"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.xml
new file mode 100644
index 0000000..31f24a7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/build.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="create-user" depends="init-common">
+ <antcall target="create-user-common">
+ <param name="user" value="${fileUser}"/>
+ <param name="password" value="${fileUserPassword}"/>
+ <param name="groups" value="${fileUserGroups}"/>
+ </antcall>
+ </target>
+
+ <target name="delete-user" depends="init-common">
+ <antcall target="delete-user-common">
+ <param name="user" value="${fileUser}"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client, create-user">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-ejb"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common, delete-user">
+ <antcall target="undeploy-app"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ <arg value="${fileUser}:${fileUserPassword}"/>
+ </java>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-sun-web.xml
new file mode 100644
index 0000000..6327b13
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-sun-web.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <security-role-mapping>
+ <role-name>user</role-name>
+ <principal-name>user</principal-name>
+ </security-role-mapping>
+
+ <service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-web.xml
new file mode 100644
index 0000000..1d1f3fe
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client-web.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+ <security-constraint>
+ <display-name>UserConstraint</display-name>
+ <web-resource-collection>
+ <web-resource-name>User</web-resource-name>
+ <description/>
+ <url-pattern>/webclient/RequestProcessor/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <description/>
+ <role-name>user</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>file</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client/TestClient.java
new file mode 100644
index 0000000..086ff49
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/client/TestClient.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String description = "jbi-serviceengine/security/jse_only";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(description);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(description);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ String passwd = args[1];
+ try {
+ int code = invokeServlet(url,passwd);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url, String userPassword) throws Exception {
+ log("Invoking url = " + url+", password = " + userPassword);
+ URL u = new URL(url);
+ String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ c1.setRequestProperty ("Authorization", "Basic " + encoding);
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EJB webservice IS") != -1)
+ found1 = true;
+ if(line.indexOf("[JBI-SecurityTest PrincipalSent=user PrincipalGot=user]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(description, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(description, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..8411a02
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import java.security.Principal;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+import javax.ejb.SessionContext;
+import javax.annotation.Resource;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource private SessionContext ctx;
+
+ public String sayHello(String who) {
+ System.out.println("**** sayHello("+ who+")");
+ Principal p = ctx.getCallerPrincipal();
+ String principal = (p == null)? "NULL": p.toString();
+ System.out.println("****EJB: principal = " + principal);
+ return "JBI-SecurityTest " + who + " PrincipalGot="+principal;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/webclient/client/Client.java
new file mode 100644
index 0000000..a266286
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/security/jse_only/webclient/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.http.*;
+import java.io.PrintWriter;
+import java.security.Principal;
+
+import javax.xml.ws.*;
+
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ Principal p = req.getUserPrincipal();
+ String principal = (p==null)? "NULL": p.toString();
+ System.out.println("****Servlet: principal = " + principal);
+
+ Hello port = service.getHelloEJBPort();
+ String ret = port.sayHello("PrincipalSent="+principal);
+ System.out.println("Return value from webservice:"+ret);
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EJB webservice IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/build.xml
new file mode 100644
index 0000000..475b1f4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/build.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="jsr208-integration-server" default="all" basedir=".">
+
+
+ <target name="all">
+ <ant dir="web" target="all"/>
+ <ant dir="ejb" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/build.xml
new file mode 100644
index 0000000..2e76fc1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/build.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+<project name="jsr108-integration tests" default="all" basedir=".">
+ <target name="all">
+ <ant dir="hello" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.properties
new file mode 100755
index 0000000..eb742fe
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="jbi-component-su-assembly" value="ejb_noname_HiEJB_consumer_assembly"/>
+<property name="jbi-component-su" value="ejb_noname_HiEJB_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.xml
new file mode 100755
index 0000000..5df479e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/build.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../../../config/common.xml">
+<!ENTITY jbiCommon SYSTEM "file:../../../../jbi_commons.properties">
+<!ENTITY commonEjbAnnotationsBuild SYSTEM "file:./../../../../../ejb_annotations/annotations-common.xml">
+<!ENTITY buildProperties SYSTEM "file:./build.properties">
+<!ENTITY jbiBuild SYSTEM "file:./../../../../jbi_commons.xml">
+]>
+
+<project name="Hi" default="all" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &buildProperties;
+ &commonEjbAnnotationsBuild;
+ &jbiCommon;
+ &jbiBuild;
+ <property name="src-name" value="endpoint/jaxws/HiEJB.java"/>
+ <property name="pkg-name" value="endpoint/jaxws"/>
+ <target name="all" depends="deploy-jbi-component-su, deploy, my-wsdl-import"/>
+
+ <target name="custom-undeploy" depends="undeploy, undeploy-jbi-component-su"/>
+
+ <target name="my-wsdl-import">
+ <antcall target="wsdl-import">
+ <param name="server" value="${server}"/>
+ <param name="port" value="HiEJB"/>
+ </antcall>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/Hi.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/Hi.java
new file mode 100755
index 0000000..b438914
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/Hi.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.jaxws;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/jaxws")
+public interface Hi {
+
+ public String sayHi(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/HiEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/HiEJB.java
new file mode 100755
index 0000000..8ec870b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/endpoint/jaxws/HiEJB.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.jaxws;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.jaxws.Hi",targetNamespace="http://endpoint/jaxws")
+@Stateless
+public class HiEJB implements Hi {
+
+ public String sayHi(String who) {
+ System.out.println("In EJB2");
+ return "WebSvcTest-Hi" + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..45ec233
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_noname_HiEJB_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>ejb_noname_HiEJB_consumer_su</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_noname_HiEJB_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService.wsdl
new file mode 100755
index 0000000..2e0886c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HiEJBService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="HiEJBService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHi">
+ <part name="parameters" element="tns:sayHi"/>
+ </message>
+ <message name="sayHiResponse">
+ <part name="parameters" element="tns:sayHiResponse"/>
+ </message>
+ <portType name="Hi">
+ <operation name="sayHi">
+ <input message="tns:sayHi"/>
+ <output message="tns:sayHiResponse"/>
+ </operation>
+ </portType>
+ <binding name="HiEJBPortBinding" type="tns:Hi">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHi">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HiEJBService">
+ <port name="HiEJBPort" binding="tns:HiEJBPortBinding">
+ <soap:address location="http://localhost:12017/HiEJBPort" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService_schema1.xsd
new file mode 100755
index 0000000..f5f3373
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/HiEJBService_schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHi" type="ns1:sayHi" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHi">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHiResponse" type="ns2:sayHiResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHiResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..c3bc41f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://endpoint/jaxws"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:HiEJBServiceInterface"
+ service-name="tns:HiEJBService"
+ endpoint-name="HiEJBPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..0e59034
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_ejb/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="HiEJBPort" service="{http://endpoint/jaxws}HiEJBService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.properties
new file mode 100755
index 0000000..69d2ca1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="subtractorservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_subtractor_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_subtractor_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.xml
new file mode 100755
index 0000000..3aab8b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/build.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="subtractor" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="setup"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/SubtractorService?WSDL"/>
+ <!--
+ <param name="client-src" value="client"/>
+ -->
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Subtractor"/>
+ </antcall>
+ </target>
+
+
+ <target name="custom-undeploy" depends="undeploy"/>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-sun-web.xml
new file mode 100755
index 0000000..171f360
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/subtractor</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Subtractor</namespaceURI>
+ <localpart>SubtractorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.subtractor.Subtractor</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-web.xml
new file mode 100755
index 0000000..afae8e7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>SubtractorServlet</display-name>
+ <servlet-name>SubtractProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SubtractProcessor</servlet-name>
+ <url-pattern>/webclient/SubtractProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/endpoint/Subtractor.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/endpoint/Subtractor.java
new file mode 100755
index 0000000..74bbc16
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/endpoint/Subtractor.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Subtractor",
+ serviceName="SubtractorService",
+ targetNamespace="http://example.com/Subtractor"
+)
+public class Subtractor {
+ static int count = 0;
+ public Subtractor() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i -j ;
+ count++;
+ System.out.println(i + "-" + j +" = " + k);
+ System.out.println("Count is: "+count);
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..1658a40
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_subtractor_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_subtractor</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_subtractor_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..6b9b035
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Subtractor"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:SubtractorService"
+ link-type="standard"
+ service-name="tns:SubtractorService"
+ endpoint-name="SubtractorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService.wsdl
new file mode 100755
index 0000000..f53b925
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.com/Subtractor" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.com/Subtractor" name="SubtractorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Subtractor" schemaLocation="SubtractorService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="Subtractor">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="SubtractorPortBinding" type="tns:Subtractor">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SubtractorService">
+ <port name="SubtractorPort" binding="tns:SubtractorPortBinding">
+ <soap:address location="http://localhost:12018/subtractorendpoint"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService_schema1.xsd
new file mode 100755
index 0000000..759b5ee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/SubtractorService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Subtractor" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.com/Subtractor"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.com/Subtractor"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..2a064b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="SubtractorPort" service="{http://example.com/Subtractor}SubtractorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/sun-web.xml
new file mode 100755
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/web.xml
new file mode 100755
index 0000000..e4c9a56
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Subtractor Service</description>
+ <display-name>SubtractorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Subtractor Web Service</description>
+ <display-name>SubtractorWebService</display-name>
+ <servlet-name>Subtractor</servlet-name>
+ <servlet-class>endpoint.Subtractor</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Subtractor</servlet-name>
+ <url-pattern>/webservice/SubtractorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/webclient/client/Client.java
new file mode 100755
index 0000000..215ed29
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/another_servlet/webclient/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.subtractor.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/subtractor") SubtractorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ Subtractor port = service.getSubtractorPort();
+ int ret = port.add(5, 2);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Subtractor add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.properties
new file mode 100644
index 0000000..88925b3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="jbi-component-su-assembly" value="ejb_noname_HelloEJB_consumer_assembly"/>
+<property name="jbi-component-su" value="ejb_noname_HelloEJB_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.xml
new file mode 100644
index 0000000..c19eac4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/build.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../../config/common.xml">
+<!ENTITY jbiCommon SYSTEM "file:../../../jbi_commons.properties">
+<!ENTITY commonEjbAnnotationsBuild SYSTEM "file:./../../../../ejb_annotations/annotations-common.xml">
+<!ENTITY buildProperties SYSTEM "file:./build.properties">
+<!ENTITY jbiBuild SYSTEM "file:./../../../jbi_commons.xml">
+]>
+
+<project name="Hello" default="all" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &buildProperties;
+ &commonEjbAnnotationsBuild;
+ &jbiCommon;
+ &jbiBuild;
+ <property name="src-name" value="endpoint/jaxws/HelloEJB.java"/>
+ <property name="client-src-name" value="client/SOAPEjbConsumer.java"/>
+ <property name="pkg-name" value="endpoint/jaxws"/>
+ <target name="all" depends="deploy-jbi-component-su, deploy-test, undeploy-jbi-component-su"/>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+ <target name="deploy-test" depends="clean">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <echo message="Starting Test ${directory}"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <antcall target="deploy">
+ <param name="pkg-name" value="${pkg-name}"/>
+ </antcall>
+ <waitfor maxwait="3" maxwaitunit="second">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </waitfor>
+
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </condition>
+ <fail message="Deployment failed" if="deploy_failed"/>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="HelloEJB"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+
+ <antcall target="run"/>
+ <echo message="Removing jar bundle ${server}.jar from autodeploy directory"/>
+ <antcall target="undeploy"/>
+ <antcall target="report"/>
+</target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/JAXWSClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/JAXWSClient.java
new file mode 100644
index 0000000..2a38e45
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/JAXWSClient.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import endpoint.jaxws.HelloEJBService;
+import endpoint.jaxws.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class JAXWSClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/ejb/hello";
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription(testId);
+ JAXWSClient client = new JAXWSClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ for (int i=0;i<10;i++) {
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ }
+ stat.addStatus(testId, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumer.java
new file mode 100755
index 0000000..c027645
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumer.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.jaxws.HelloEJBService;
+import endpoint.jaxws.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumer {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/server/ejb/hello";
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription(testId);
+ SOAPEjbConsumer client = new SOAPEjbConsumer();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ //String endpointURI ="http://localhost:8080/soap/ejb/noname/helloendpoint";
+ String endpointURI ="http://localhost:12015/HelloEJBPort";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus(testId, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumerNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumerNonHttpBC.java
new file mode 100755
index 0000000..bbbb7c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/client/SOAPEjbConsumerNonHttpBC.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.jaxws.HelloEJBService;
+import endpoint.jaxws.Hello;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPEjbConsumerNonHttpBC {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/ejb/hello";
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ public static void main(String[] args) {
+ stat.addDescription(testId);
+ SOAPEjbConsumerNonHttpBC client = new SOAPEjbConsumerNonHttpBC();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+ try {
+ Hello port = service.getHelloEJBPort();
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:8080/soap/ejb/noname/helloendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus(testId, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/Hello.java
new file mode 100644
index 0000000..d954f71
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.jaxws;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/jaxws")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/HelloEJB.java
new file mode 100644
index 0000000..1a5c2f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/endpoint/jaxws/HelloEJB.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.jaxws;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(endpointInterface="endpoint.jaxws.Hello", targetNamespace="http://endpoint/jaxws")
+@Stateless
+public class HelloEJB implements Hello {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..8762c4e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_noname_HelloEJB_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>ejb_noname_HelloEJB_consumer_su</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_noname_HelloEJB_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService.wsdl
new file mode 100644
index 0000000..81bcb7a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://endpoint/jaxws" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://endpoint/jaxws" name="HelloEJBService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://endpoint/jaxws" schemaLocation="HelloEJBService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="Hello">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="HelloEJBPortBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloEJBService">
+ <port name="HelloEJBPort" binding="tns:HelloEJBPortBinding">
+ <soap:address location="http://localhost:12015/HelloEJBPort" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService_schema1.xsd
new file mode 100644
index 0000000..f207ad7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/HelloEJBService_schema1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://endpoint/jaxws" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="ns1:sayHello" xmlns:ns1="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="sayHelloResponse" type="ns2:sayHelloResponse" xmlns:ns2="http://endpoint/jaxws"/>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..8eec636
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://endpoint/jaxws"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:HelloEJBServiceInterface"
+ service-name="tns:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..7563826
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="HelloEJBPort" service="{http://endpoint/jaxws}HelloEJBService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..c95ba9a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>ejb_noname_HelloEJB_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>ejb_noname_HelloEJB_consumer_su</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>ejb_noname_HelloEJB_consumer_su.jar</artifacts-zip>
+ <component-name>SunSOAPBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..1658d16
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://endpoint/jaxws"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:HelloEJBServiceInterface"
+ service-name="tns:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <artifacts xmlns="" role="consumer" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..d2492b6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <endpoint xmlns="http://www.sun.com/ns/jbi/component/soap/deploy"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sun.com/ns/jbi/component/soap/deploy ./endpoints.xsd">
+<service-name>
+ <namespace-uri>http://endpoint/jaxws</namespace-uri>
+ <local-part>HelloEJBService</local-part>
+ </service-name>
+ <endpoint-name>HelloEJBPort</endpoint-name>
+ <endpoint-role>consumer</endpoint-role>
+ <address-location>http://localhost:8080/soap/ejb/noname/helloendpoint</address-location>
+ <style>http://www.w3.org/2004/08/wsdl/style/rpc</style>
+ <operation>
+ <name>sayHello</name>
+ <mep>http://www.w3.org/2004/08/wsdl/in-out</mep>
+ <soapaction>""</soapaction>
+ <input>
+ <namespace-uri>http://endpoint/jaxws</namespace-uri>
+ </input>
+ <output>
+ <namespace-uri>http://endpoint/jaxws</namespace-uri>
+ </output>
+ </operation>
+</endpoint>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stress.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stress.xml
new file mode 100755
index 0000000..d6e3731
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stress.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../../config/common.xml">
+<!ENTITY jbiCommon SYSTEM "file:../../../jbi_commons.properties">
+<!ENTITY commonEjbAnnotationsBuild SYSTEM "file:./../../../../ejb_annotations/annotations-common.xml">
+<!ENTITY buildProperties SYSTEM "file:./build.properties">
+<!ENTITY jbiBuild SYSTEM "file:./../../../jbi_commons.xml">
+]>
+
+<project name="Hello" default="all" basedir=".">
+ &commonSetup;
+ &commonBuild;
+ &buildProperties;
+ &commonEjbAnnotationsBuild;
+ &jbiCommon;
+ &jbiBuild;
+ <property name="src-name" value="endpoint/jaxws/HelloEJB.java"/>
+ <property name="client-src-name" value="stressclient/StressSOAPEjbConsumer.java"/>
+ <property name="pkg-name" value="endpoint/jaxws"/>
+ <target name="all" depends="deploy-jbi-component-su, another_servlet, another_ejb, mytest-all, undeploy-jbi-component-su,undeploy-all,clean"/>
+
+ <target name="mytest-all" >
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <echo message="Starting Test ${directory}"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <antcall target="deploy">
+ <param name="pkg-name" value="${pkg-name}"/>
+ </antcall>
+ <condition property="deploy_succeeded">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployed"/>
+ </condition>
+ <condition property="deploy_failed">
+ <available file="${env.S1AS_HOME}/domains/domain1/autodeploy/${server}.jar_deployFailed"/>
+ </condition>
+ <fail message="Deployment failed" if="deploy_failed"/>
+ <antcall target="wsdl-import">
+ <param name="server" value="${server}"/>
+ <param name="port" value="HelloEJB"/>
+ </antcall>
+ <javac srcdir="." destdir="${env.APS_HOME}/build/module/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar:${env.APS_HOME}/build/module/classes/client"
+ includes="${client-src-name}">
+ </javac>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${env.APS_HOME}/build/module/classes"/>
+ <copydir src="${env.APS_HOME}/build/module/classes/client/com" dest="${env.APS_HOME}/build/module/classes/com"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient" dir="${env.APS_HOME}/build/module/classes">
+ <arg line="stressclient.StressSOAPEjbConsumer ${minutes}"/>
+ </exec>
+ <echo message="Removing jar bundle ${server}.jar from autodeploy directory"/>
+ <antcall target="undeploy"/>
+ <antcall target="report"/>
+ </target>
+
+ <target name="another_ejb">
+ <ant inheritAll="false" dir="./another_ejb"/>
+ </target>
+
+ <target name="another_servlet">
+ <ant inheritAll="false" dir="./another_servlet"/>
+ </target>
+
+
+ <target name="undeploy-all">
+ <ant inheritAll="false" dir="./another_ejb" target="custom-undeploy"/>
+ <ant inheritAll="false" dir="./another_servlet" target="custom-undeploy"/>
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressClient.java
new file mode 100755
index 0000000..be14e32
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressClient.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2017, 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 stressclient;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.jaxws.HelloEJBService;
+import endpoint.jaxws.Hello;
+
+import endpoint.jaxws.HiEJBService;
+import endpoint.jaxws.Hi;
+
+import com.example.subtractor.SubtractorService;
+import com.example.subtractor.Subtractor;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class StressClient extends Thread {
+
+ int clientId;
+ Hello port;
+ Hi port1;
+ Subtractor port2;
+
+ private static String testId = "jbi-serviceengine/server/ejb/hello/stressclient";
+
+ static long startTime = 0;
+ static int minutesToRun = 0;
+ static long endTime = 0;
+
+
+ private SimpleReporterAdapter stat ;
+
+ HelloEJBService service;
+ HiEJBService service1;
+ SubtractorService service2;
+
+ StressClient(int i,SimpleReporterAdapter stat) {
+ System.out.println("Instantiating a stress client");
+ //stat.addDescription("jsr108-serverside-webservices-ejb-noname-annotation");
+ clientId = i;
+ this.stat = stat;
+ }
+
+ void setServiceHandle( HelloEJBService ser, HiEJBService ser1, SubtractorService ser2){
+ service = ser;
+ service1 = ser1;
+ service2 = ser2;
+ }
+
+ static void setTimeToRun( int minutes ) {
+ minutesToRun = minutes;
+ startTime = System.currentTimeMillis();
+ }
+
+ public void run() {
+ port = service.getHelloEJBPort();
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12015/HelloEJBPort";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(clientId + ":" + " After setting endpoint address URI");
+
+ port1 = service1.getHiEJBPort();
+ BindingProvider stub1 = (BindingProvider)port1;
+ String endpointURI1 ="http://localhost:12017/HiEJBPort";
+ stub1.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI1);
+
+ port2 = service2.getSubtractorPort();
+ BindingProvider stub2 = (BindingProvider)port2;
+ String endpointURI2 ="http://localhost:12018/subtractorendpoint";
+ stub2.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI2);
+
+
+ while((endTime - startTime) < minutesToRun*60*1000) {
+ // Iterative tester for stress, per Thread
+ for ( int i=0 ; i < 10; i++)
+ doTest("Stress Tester",i);
+ endTime = System.currentTimeMillis();
+ }
+ }
+
+ public void doTest(String toSend, int id) {
+ try {
+ Integer i = (Integer)id;
+
+ String ret = port.sayHello(toSend+i);
+ String ret1 = port1.sayHi(toSend+i);
+ int res = port2.add(5,2);
+
+ if(ret.indexOf("WebSvcTest-Hello") == -1 || ret.indexOf(i.toString()) == -1) {
+ System.out.println(clientId + ":" + "Unexpected greeting " + ret);
+ stat.addStatus(testId, stat.FAIL);
+ stat.printSummary(testId);
+ return;
+ }
+ //pass();
+ System.out.println(clientId + ":" + ret);
+
+ if(ret1.indexOf("WebSvcTest-Hi") == -1 || ret1.indexOf(i.toString()) == -1) {
+ System.out.println(clientId + ":" + "Unexpected greeting " + ret1);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ //pass();
+ System.out.println(clientId + ":" + ret1);
+
+ if( res != 3) {
+ System.out.println(clientId + ":" + "Unexpected result " + res);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ //pass();
+ System.out.println(clientId + "Result is :" + res);
+
+ } catch(Exception e) {
+ stat.addStatus(testId, stat.FAIL);
+ stat.printSummary(testId);
+ e.printStackTrace();
+ }
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressSOAPEjbConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressSOAPEjbConsumer.java
new file mode 100755
index 0000000..071837e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/ejb/hello/stressclient/StressSOAPEjbConsumer.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 stressclient;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.jaxws.HelloEJBService;
+import endpoint.jaxws.Hello;
+import endpoint.jaxws.HiEJBService;
+import endpoint.jaxws.Hi;
+import com.example.subtractor.Subtractor;
+import com.example.subtractor.SubtractorService;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class StressSOAPEjbConsumer {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/ejb/hello/stressclient";
+
+ @WebServiceRef
+ static HelloEJBService service;
+
+ @WebServiceRef
+ static HiEJBService service1;
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/subtractorservice/webservice/SubtractorService?WSDL")
+ static SubtractorService service2;
+
+
+ static long startTime = 0;
+ static int minutesToRun = 0;
+ static long endTime = 0;
+
+ StressSOAPEjbConsumer() {
+ //create multiple instances of iterative test clients.
+ StressClient clients[] = new StressClient[100];
+ for(int i = 0 ; i < 100 ; i++) {
+ clients[i] = new StressClient(i,stat);
+ clients[i].setServiceHandle(service,service1,service2);
+ clients[i].start();
+ }
+ }
+ public static void main(String[] args) throws Exception {
+ stat.addDescription(testId);
+
+ if( args != null && args.length > 0 && args[0] != null)
+ try {
+ minutesToRun = Integer.parseInt(args[0]);
+ } catch(NumberFormatException numEx) {
+ minutesToRun = 3;
+ }
+ System.out.println("Time to run is: "+minutesToRun);
+ Thread.currentThread().sleep(2000);
+ StressClient.setTimeToRun(minutesToRun);
+ StressSOAPEjbConsumer stressClient = new StressSOAPEjbConsumer();
+ //stat.addStatus("jsr108-serverside-webservices-ejb-noname-annotation", stat.PASS);
+ //stat.printSummary("jsr108-serverside-webservices-ejb-noname-annotation");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/README
new file mode 100644
index 0000000..f2c8554
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/README
@@ -0,0 +1,17 @@
+This is a Calculator web service, packaged as a servlet, with only one operation add which
+adds two numbers. Client is a standalone java application which can send request
+to the webservice either in standard way using HTTP or through SOAPBinding.
+By default the web service is activated in JBI environment. The sample also demonstrates
+how an endpoint can be deactivated from JBI environment.
+
+ant all of this sample does the following :
+
+1. compiles and deploys the web service on application server, deploys a
+producer service unit on SOAP Binding
+2. sends a request through SOAP binding,
+3. disable activation of web service in JBI and send requests through JBI SOAP binding again for testing negative test scenario,
+4. runs the client which makes request web service invocation using HTTP to confirm that web service is still accessible using normal path even though it has been deactivated from JBI,
+5. Activate the web service again in JBI and send a request through SOAP binding
+6. undeploy application from app server and service assembly deployment from
+SOAP Binding.
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.properties
new file mode 100644
index 0000000..68987bd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calculatorservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.xml
new file mode 100644
index 0000000..404fff8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/build.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+ <target name="runtest-jaxws" depends="init-common">
+ <antcall target="run-client">
+ <param name="client-class" value="client.JAXWSClient"/>
+ <param name="other-args" value="war-with-endpointimpl-only"/>
+ </antcall>
+ </target>
+ <target name="runtest" depends="init-common" >
+ <!--<echo message="Running SOAP Binding client"/>
+ <antcall target="runtest-soap-binding"/>-->
+ <echo message="Running negative test by setting jbi-enabled flag to false"/>
+ <antcall target="runtest-jbi-enabled-false"/>
+ <echo message="Running JAXWS client"/>
+ <antcall target="runtest-jaxws"/>
+ <echo message="Running positive test by setting jbi-enabled flag to true"/>
+ <antcall target="runtest-jbi-enabled-true"/>
+
+ </target>
+ <target name="runtest-soap-binding" depends="init-common">
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumerNonHttpBC"/>
+ <param name="other-args" value="jbi-enabled-true"/>
+ </antcall>
+ </target>
+ <target name="runtest-jbi-enabled-false" depends="init-common">
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=false"/>
+ </antcall>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumerNonHttpBC"/>
+ <param name="other-args" value="jbi-enabled-false"/>
+ </antcall>
+ </target>
+ <target name="runtest-jbi-enabled-true" depends="init-common">
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=true"/>
+ </antcall>
+ <antcall target="runtest-soap-binding"/>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/JAXWSClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/JAXWSClient.java
new file mode 100644
index 0000000..068c925
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/JAXWSClient.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class JAXWSClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/web/client";
+
+ @WebServiceRef(wsdlLocation="http://localhost:8080/calculatorservice/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+
+ public static void main(String[] args) {
+ try {
+ stat.addDescription(testId);
+ //CalculatorService service = new CalculatorService();
+ JAXWSClient client = new JAXWSClient();
+ client.doTest(args, service);
+ stat.printSummary(testId);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void doTest(String[] args, CalculatorService service) {
+ try {
+ System.out.println(" Before getting port service is : " + service);
+ Calculator port = service.getCalculatorPort();
+ for (int i=0;i<10;i++) {
+ int ret = port.add(i, 10);
+ if(ret != (i + 10)) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(testId, stat.FAIL);
+ return;
+ }
+ System.out.println(" Adding : " + i + " + 10 = " + ret);
+ }
+ stat.addStatus(testId, stat.PASS);
+ } catch(Exception e) {
+ e.printStackTrace();
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..666f397
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumer.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/calculatorservice/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/web/client";
+ public static void main (String[] args) {
+ stat.addDescription(testId + args[0]);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer(args);
+ stat.printSummary(testId + args[0]);
+ }
+
+ private void addUsingSOAPConsumer(String[] args) {
+ com.example.calculator.Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ //String endpointURI ="http://localhost:8080/soap/web/calculatorendpoint";
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ System.out.println(" Using SOAP binding's consumer to add 1 + 2 = " + port.add(1,2));
+ if(args[0].equals("jbi-enabled-true"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ if(args[0].equals("jbi-enabled-false"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumerNonHttpBC.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumerNonHttpBC.java
new file mode 100755
index 0000000..e0e7dfb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/client/SOAPWebConsumerNonHttpBC.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumerNonHttpBC {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/calculatorservice/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/server/web/client";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId + args[0]);
+ SOAPWebConsumerNonHttpBC client = new SOAPWebConsumerNonHttpBC();
+ client.addUsingSOAPConsumer(args);
+ stat.printSummary(testId + args[0]);
+ }
+
+ private void addUsingSOAPConsumer(String[] args) {
+ com.example.calculator.Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ System.out.println(" Using SOAP binding's consumer to add 1 + 2 = " + port.add(1,2));
+ if(args[0].equals("jbi-enabled-true"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ if(args[0].equals("jbi-enabled-false"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/endpoint/Calculator.java
new file mode 100644
index 0000000..75b27d7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/endpoint/Calculator.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.com/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..b4da986
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..4eb468e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions targetNamespace="http://example.com/Calculator" name="CalculatorService" xmlns:tns="http://example.com/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Calculator" schemaLocation="CalculatorService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..1022aa1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.com/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.com/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..2d1e7e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..329a809
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.com/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..8e62a0f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>SunSOAPBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..4190ac7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts role="consumer" xmlns="" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..4bef58a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <endpoint xmlns="http://www.sun.com/ns/jbi/component/soap/deploy"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.sun.com/ns/jbi/component/soap/deploy ./endpoints.xsd">
+<service-name>
+ <namespace-uri>http://example.com/Calculator</namespace-uri>
+ <local-part>CalculatorService</local-part>
+ </service-name>
+ <endpoint-name>CalculatorPort</endpoint-name>
+ <endpoint-role>consumer</endpoint-role>
+ <address-location>http://localhost:8080/soap/web/calculatorendpoint</address-location>
+ <style>http://www.w3.org/2004/08/wsdl/style/rpc</style>
+ <operation>
+ <name>add</name>
+ <mep>http://www.w3.org/2004/08/wsdl/in-out</mep>
+ <soapaction>""</soapaction>
+ <input>
+ <namespace-uri>http://example.com/Calculator</namespace-uri>
+ </input>
+ <output>
+ <namespace-uri>http://example.com/Calculator</namespace-uri>
+ </output>
+ </operation>
+</endpoint>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/server/web/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/README
new file mode 100644
index 0000000..aa31e12
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/README
@@ -0,0 +1,28 @@
+This test case has :
+--------------------
+
+A simple webservice returns the sum of two integers. This is bundled as a
+servlet inside a WAR file. This WAR file is included in the service assembly
+and is deployed by the JavaEE Service Engine.
+
+A simple servlet (with jbi_enabled=true) to access this web service
+
+A simple java client to invoke this servlet
+
+The test case uses:
+------------------
+
+Java EE Service Engine as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice
+
+Expected result:
+----------------
+
+The Java EE Service Engine should successfully deploy the service unit.
+
+Java client should be able to successfully invoke the webservice and get
+the sum of two numbers.
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.properties
new file mode 100644
index 0000000..d70fe04
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_service_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_su"/>
+<property name="jbi-component-su-dir" value="javaee-se-serviceunit"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.xml
new file mode 100644
index 0000000..c1ab93b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/build.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${jbi-component-su-dir}/assembly/${appname}-web.war"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-jbi-component-su,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}-web.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <!-- Add META-INF/jbi.xml to .war file -->
+ <mkdir dir="${build.classes.dir}/tmp/META-INF"/>
+ <echo message="created dir = ${build.classes.dir}/tmp/META-INF"/>
+ <copy file="${jbi-component-su-dir}/su/META-INF/jbi.xml" tofile="${build.classes.dir}/tmp/META-INF/jbi.xml"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="META-INF/jbi.xml"/>
+ </fileset>
+ </jar>
+ <!-- Copy the JavaEE app to the service assembly -->
+ <copy file="${assemble.dir}/${appname}-web.war" todir="${jbi-component-su-dir}/assembly"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client-web/webservice/AddNumberService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client-web/webservice/AddNumberService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#AddNumber"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-sun-web.xml
new file mode 100644
index 0000000..254b0ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/AddNumber</namespaceURI>
+ <localpart>AddNumberPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.AddNumber</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client/TestClient.java
new file mode 100644
index 0000000..bf2db23
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/client/TestClient.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/add-numbers";
+
+ public boolean found1 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("Result is") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/endpoint/AddNumber.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/endpoint/AddNumber.java
new file mode 100644
index 0000000..8361038
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/endpoint/AddNumber.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="AddNumber",
+ serviceName="AddNumberService",
+ targetNamespace="http://example.web.service/AddNumber"
+)
+public class AddNumber {
+ public AddNumber() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+ //throw new java.lang.Exception("This is my exception");
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..aea15a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/assembly/META-INF/jbi.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <name>client_web_calculator_service_assembly</name>
+ <description>Client web calculator service assembly</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>calc-web-client</name>
+ <description>provider service</description>
+ </identification>
+ <target>
+ <artifacts-zip>calc-web-client-web.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml
new file mode 100755
index 0000000..2ff1f0c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/javaee-se-serviceunit/su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/AddNumber"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <provides interface-name="tns:AddNumberServiceInterface"
+ service-name="tns:AddNumberService"
+ endpoint-name="AddNumberPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/web.xml
new file mode 100644
index 0000000..104b580
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the AddNumber Service</description>
+ <display-name>AddNumberWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for AddNumber Web Service</description>
+ <display-name>AddNumberWebService</display-name>
+ <servlet-name>AddNumber</servlet-name>
+ <servlet-class>endpoint.AddNumber</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AddNumber</servlet-name>
+ <url-pattern>/webservice/AddNumberService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/webclient/client/Client.java
new file mode 100644
index 0000000..facf5e1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/add-numbers/webclient/client/Client.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.addnumber.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") AddNumberService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ AddNumber port = service.getAddNumberPort();
+ int ret = port.add(1, 2);
+ printSuccess(out,ret);
+ } catch(java.lang.Exception e) {
+ //e.printStackTrace();
+ printFailure(out, e.getMessage());
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out, String errMsg) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: Error message - " + errMsg);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out, int result) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Result is : " + result);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/build.xml
new file mode 100644
index 0000000..f70a9c0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/build.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="service_unit" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="compApp-server" target="all"/>
+ <ant dir="compApp-client" target="all"/>
+ <ant dir="endpoint_mapping" target="all"/>
+ <ant dir="endpoint_mapping_consumer" target="all"/>
+ <ant dir="add-numbers" target="all"/>
+ <ant dir="enterprise_app" target="all"/>
+ </target>
+
+ <target name="clean">
+ <ant dir="compApp-server" target="clean"/>
+ <ant dir="compApp-client" target="clean"/>
+ <ant dir="endpoint_mapping" target="clean"/>
+ <ant dir="endpoint_mapping_consumer" target="clean"/>
+ <ant dir="add-numbers" target="clean"/>
+ <ant dir="enterprise_app" target="clean"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/README
new file mode 100644
index 0000000..ac55421
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/README
@@ -0,0 +1,26 @@
+This test demonstrates usage of a composite application when JavaEE SE is
+consumer. There is a Calculator webservice with add operation that adds two
+numbers. This calculator service is deployed in appserver with jbi-enabled set
+to false so that the service can not be called through JavaEE SE.
+
+The webservice client is a servlet that sends an add request to the calculator
+service. This servlet is deployed as part of a composite application.
+A standalone Java client is used to invoke this servlet and execute this test.
+
+ant all of this test does the following :
+
+task setup:
+ 1. Calculator webservice is deployed in appserver and jbi-enabled flag is
+ set to false
+ 2. A service assembly is created and deployed that contains a JavaEE service
+ unit consuming calculator service and a HTTP BC service unit that provides
+ calculator service.
+task runtest:
+ Client invokes the test servlet which in calls the calculator
+ service. This call goes through JavaEE SE. Below is the runtime call flow-
+
+TestClient --> Client(Servlet) --> JavaEE SE --> HTTP BC --> Calculator WS
+
+task undeploy:
+ undeploys the calculator service from appserver and composite application
+ from from JBI
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.properties
new file mode 100644
index 0000000..e318c43
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.xml
new file mode 100644
index 0000000..9eba418
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/build.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="compApp-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-app, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-app" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app" depends="init-common">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}-web"/>
+ </antcall>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=false"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/webclient/META-INF"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client-web/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client-web/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <copy file="./jbi.xml" tofile="${build.classes.dir}/webclient/META-INF/jbi.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <mkdir dir="./temp"/>
+ <copy file="${assemble.dir}/wsclient.war" todir="./temp"/>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client/TestClient.java
new file mode 100644
index 0000000..afd178a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/compApp-client";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[3]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/endpoint/Calculator.java
new file mode 100644
index 0000000..7553337
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/endpoint/Calculator.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/jbi.xml
new file mode 100644
index 0000000..1fa92bd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <consumes interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..f9171c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>wsclient</name>
+ <description>Represents this Service Unit</description>
+ </identification>
+ <target>
+ <artifacts-zip>wsclient.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl
new file mode 100644
index 0000000..acf05d9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:8080/jsr208-integration-web-client-web/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..1fe2368
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/CalculatorService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..33974f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..d13e6eb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/webclient/client/Client.java
new file mode 100644
index 0000000..d1c310f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-client/webclient/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Calculator add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/README
new file mode 100644
index 0000000..5f3beba
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/README
@@ -0,0 +1,9 @@
+This test demonstrates usage of a composite application when JavaEE SE is provider. There
+is a Calculator webservice with add operation that adds two numbers. Client is a standalone
+Java application which sends request to the webservice through HTTP SOAPBinding.
+
+ant all of this test does the following :
+
+1. task setup: A service assembly is created and deployed that contains a JavaEE service unit providing calculator service and a HTTP BC service unit that consumes calculator service.
+2. task runtest: Client sends an add request through SOAP binding,
+3. task undeploy: undeploys the composite application from from JBI
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.properties
new file mode 100644
index 0000000..72c2645
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calculatorservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.xml
new file mode 100644
index 0000000..868d396
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/build.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="compApp-server" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-app, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-app" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <metainf file="jbi.xml"/>
+ </jar>
+ </target>
+
+ <target name="deploy-app" depends="init-common">
+ <mkdir dir="./temp"/>
+ <copy file="${assemble.dir}/calculatorservice-web.war" todir="./temp"/>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}-web/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ <param name="other-args" value="jbi-enabled-true"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..f18ec92
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/client/SOAPWebConsumer.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/calculatorservice-web/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/compApp-server";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId + args[0]);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer(args);
+ stat.printSummary(testId + args[0]);
+ }
+
+ private void addUsingSOAPConsumer(String[] args) {
+ com.example.calculator.Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ System.out.println(" Using SOAP binding's consumer to add 1 + 2 = " + port.add(1,2));
+ if(args[0].equals("jbi-enabled-true"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ if(args[0].equals("jbi-enabled-false"))
+ stat.addStatus(testId, stat.PASS);
+ else
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/endpoint/Calculator.java
new file mode 100644
index 0000000..75b27d7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/endpoint/Calculator.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.com/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/jbi.xml
new file mode 100644
index 0000000..f915dc2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <provides interface-name="tns:CalculatorService"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..090b430
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>calculatorservice-web</name>
+ <description>Represents this Service Unit</description>
+ </identification>
+ <target>
+ <artifacts-zip>calculatorservice-web.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl
new file mode 100644
index 0000000..4eb468e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService.wsdl
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions targetNamespace="http://example.com/Calculator" name="CalculatorService" xmlns:tns="http://example.com/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Calculator" schemaLocation="CalculatorService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..1022aa1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/CalculatorService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.com/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.com/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml
new file mode 100755
index 0000000..2d1e7e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/endpoints.xml
new file mode 100755
index 0000000..329a809
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/soap-binding-su/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.com/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/compApp-server/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/README
new file mode 100644
index 0000000..aa31e12
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/README
@@ -0,0 +1,28 @@
+This test case has :
+--------------------
+
+A simple webservice returns the sum of two integers. This is bundled as a
+servlet inside a WAR file. This WAR file is included in the service assembly
+and is deployed by the JavaEE Service Engine.
+
+A simple servlet (with jbi_enabled=true) to access this web service
+
+A simple java client to invoke this servlet
+
+The test case uses:
+------------------
+
+Java EE Service Engine as the consumer.
+
+Java EE Service Engine as the provider.
+
+client <----> servlet <-----> JavaEE SE <-----NMR------> JavaEE SE <------> webservice
+
+Expected result:
+----------------
+
+The Java EE Service Engine should successfully deploy the service unit.
+
+Java client should be able to successfully invoke the webservice and get
+the sum of two numbers.
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.properties
new file mode 100644
index 0000000..d70fe04
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_service_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_su"/>
+<property name="jbi-component-su-dir" value="javaee-se-serviceunit"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.xml
new file mode 100644
index 0000000..db511ea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/build.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${jbi-component-su-dir}/assembly/${appname}-web.war"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-jbi-component-su,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}-web.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ <!-- Add META-INF/jbi.xml to .war file -->
+ <mkdir dir="${build.classes.dir}/tmp/META-INF"/>
+ <echo message="created dir = ${build.classes.dir}/tmp/META-INF"/>
+ <copy file="${jbi-component-su-dir}/su/META-INF/jbi.xml" tofile="${build.classes.dir}/tmp/META-INF/jbi.xml"/>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="META-INF/jbi.xml"/>
+ </fileset>
+ </jar>
+ <!-- Copy the JavaEE app to the service assembly -->
+ <copy file="${assemble.dir}/${appname}-web.war" todir="${jbi-component-su-dir}/assembly"/>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client-web/webservice/EndpointMappingService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client-web/webservice/EndpointMappingService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#EndpointMapping"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-sun-web.xml
new file mode 100644
index 0000000..bb83def
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/EndpointMapping</namespaceURI>
+ <localpart>EndpointMappingPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.EndpointMapping</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client/TestClient.java
new file mode 100644
index 0000000..eed8e5a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/client/TestClient.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/endpoint-naming";
+
+ public boolean found1 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("Result is") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/endpoint/EndpointMapping.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/endpoint/EndpointMapping.java
new file mode 100644
index 0000000..61ad5f1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/endpoint/EndpointMapping.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="EndpointMapping",
+ serviceName="EndpointMappingService",
+ targetNamespace="http://example.web.service/EndpointMapping"
+)
+public class EndpointMapping {
+ public EndpointMapping() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+ //throw new java.lang.Exception("This is my exception");
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..956186b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/assembly/META-INF/jbi.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns0="http://example.web.service/EndpointMapping"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <name>client_web_calculator_service_assembly</name>
+ <description>Client web calculator service assembly</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>calc-web-client</name>
+ <description>provider service</description>
+ </identification>
+ <target>
+ <artifacts-zip>calc-web-client-web.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+
+ <connections>
+ <connection>
+ <consumer endpoint-name="EndpointMappingPort" service-name="ns0:EndpointMappingService"/>
+ <provider endpoint-name="javaee_EndpointMappingPort" service-name="ns0:EndpointMappingService"/>
+ </connection>
+ </connections>
+ </service-assembly>
+
+</jbi>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml
new file mode 100755
index 0000000..54fe804
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/javaee-se-serviceunit/su/META-INF/jbi.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi xmlns="http://java.sun.com/xml/ns/jbi" xmlns:javaee_ext="http://javaee.serviceengine.sun.com/endpoint/naming/extension" xmlns:ns0="http://example.web.service/EndpointMapping" version="1.0">
+ <services binding-component="false">
+ <provides endpoint-name="javaee_EndpointMappingPort" interface-name="ns0:EndpointMappingServiceInterface" service-name="ns0:EndpointMappingService"/>
+ <javaee_ext:ept-mappings>
+ <javaee_ext:ept-mapping>
+ <javaee_ext:java-ept endpoint-name="javaee_EndpointMappingPort" interface-name="ns0:EndpointMappingServiceInterface" service-name="ns0:EndpointMappingService" type="provider"/>
+ <javaee_ext:wsdl-ept endpoint-name="EndpointMappingPort" interface-name="ns0:EndpointMappingServiceInterface" service-name="ns0:EndpointMappingService" type="provider"/>
+ </javaee_ext:ept-mapping>
+ </javaee_ext:ept-mappings>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/web.xml
new file mode 100644
index 0000000..358740a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the EndpointMapping Service</description>
+ <display-name>EndpointMappingWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for EndpointMapping Web Service</description>
+ <display-name>EndpointMappingWebService</display-name>
+ <servlet-name>EndpointMapping</servlet-name>
+ <servlet-class>endpoint.EndpointMapping</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EndpointMapping</servlet-name>
+ <url-pattern>/webservice/EndpointMappingService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/webclient/client/Client.java
new file mode 100644
index 0000000..ffdd9dc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping/webclient/client/Client.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.endpointmapping.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") EndpointMappingService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ EndpointMapping port = service.getEndpointMappingPort();
+ int ret = port.add(1, 2);
+ printSuccess(out,ret);
+ } catch(java.lang.Exception e) {
+ //e.printStackTrace();
+ printFailure(out, e.getMessage());
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out, String errMsg) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: Error message - " + errMsg);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out, int result) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Result is : " + result);
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.properties
new file mode 100644
index 0000000..acc57f3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="sun-http-binding"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.xml
new file mode 100644
index 0000000..fc8855f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/build.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="endpoint_mapping_consumer" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-app, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-app" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app" depends="init-common">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}-web"/>
+ </antcall>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.EndpointMappingConsumer.jbi-enabled=false"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${build.classes.dir}/webclient/META-INF"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes ./webclient/client/wsdl/EndpointMappingConsumerService.wsdl" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes ./webclient/client/wsdl/EndpointMappingConsumerService.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <copy file="./jbi.xml" tofile="${build.classes.dir}/webclient/META-INF/jbi.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="init-common">
+ <mkdir dir="./temp"/>
+ <copy file="${assemble.dir}/wsclient.war" todir="./temp"/>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#EndpointMappingConsumer"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client/TestClient.java
new file mode 100644
index 0000000..6b64922
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/endpoint_mapping_consumer";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EndpointMappingConsumer add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[3]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java
new file mode 100644
index 0000000..d59ad88
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/endpoint/EndpointMappingConsumer.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="EndpointMappingConsumer",
+ serviceName="EndpointMappingConsumerService",
+ targetNamespace="http://example.web.service/EndpointMappingConsumer"
+)
+public class EndpointMappingConsumer {
+ public EndpointMappingConsumer() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/jbi.xml
new file mode 100644
index 0000000..3e17b8c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/jbi.xml
@@ -0,0 +1,38 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:ns0="http://example.web.service/EndpointMappingConsumer"
+ xmlns:javaee_ext="http://javaee.serviceengine.sun.com/endpoint/naming/extension"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <consumes interface-name="ns0:EndpointMappingConsumerServiceInterface"
+ service-name="ns0:EndpointMappingConsumerService"
+ endpoint-name="javaee_EndpointMappingConsumerPort"/>
+ <javaee_ext:ept-mappings>
+ <javaee_ext:ept-mapping>
+ <javaee_ext:java-ept endpoint-name="javaee_EndpointMappingConsumerPort" interface-name="ns0:EndpointMappingConsumerServiceInterface" service-name="ns0:EndpointMappingConsumerService" type="consumer"/>
+ <javaee_ext:wsdl-ept endpoint-name="EndpointMappingConsumerPort" interface-name="ns0:EndpointMappingConsumerServiceInterface" service-name="ns0:EndpointMappingConsumerService" type="consumer"/>
+ </javaee_ext:ept-mapping>
+ </javaee_ext:ept-mappings>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..c322df7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/assembly/META-INF/jbi.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns0="http://example.web.service/EndpointMappingConsumer"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>wsclient</name>
+ <description>Represents this Service Unit</description>
+ </identification>
+ <target>
+ <artifacts-zip>wsclient.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+
+ <connections>
+ <connection>
+ <consumer endpoint-name="javaee_EndpointMappingConsumerPort" service-name="ns0:EndpointMappingConsumerService"/>
+ <provider endpoint-name="EndpointMappingConsumerPort" service-name="ns0:EndpointMappingConsumerService"/>
+ </connection>
+ </connections>
+
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl
new file mode 100644
index 0000000..7064b61
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2-hudson-132-M1. --><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/EndpointMappingConsumer" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" targetNamespace="http://example.web.service/EndpointMappingConsumer" name="EndpointMappingConsumerService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/EndpointMappingConsumer" schemaLocation="EndpointMappingConsumerService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="EndpointMappingConsumer">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="EndpointMappingConsumerPortBinding" type="tns:EndpointMappingConsumer">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="EndpointMappingConsumerService">
+ <port name="EndpointMappingConsumerPort" binding="tns:EndpointMappingConsumerPortBinding">
+ <soap:address location="http://localhost:8080/jsr208-integration-web-client-web/webservice/EndpointMappingConsumerService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd
new file mode 100644
index 0000000..6306313
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/EndpointMappingConsumerService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/EndpointMappingConsumer" xmlns:tns="http://example.web.service/EndpointMappingConsumer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="tns:add"/>
+
+ <xs:element name="addResponse" type="tns:addResponse"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml
new file mode 100755
index 0000000..0f959c9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/EndpointMappingConsumer"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:EndpointMappingConsumerServiceInterface"
+ service-name="tns:EndpointMappingConsumerService"
+ endpoint-name="EndpointMappingConsumerPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml
new file mode 100755
index 0000000..0f0f96c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-http-binding/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="EndpointMappingConsumerPort" service="{http://example.web.service/EndpointMappingConsumer}EndpointMappingConsumerService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/web.xml
new file mode 100644
index 0000000..c3440c3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the EndpointMappingConsumer Service</description>
+ <display-name>EndpointMappingConsumerWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for EndpointMappingConsumer Web Service</description>
+ <display-name>EndpointMappingConsumerWebService</display-name>
+ <servlet-name>EndpointMappingConsumer</servlet-name>
+ <servlet-class>endpoint.EndpointMappingConsumer</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EndpointMappingConsumer</servlet-name>
+ <url-pattern>/webservice/EndpointMappingConsumerService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/Client.java
new file mode 100644
index 0000000..ad1c054
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.endpointmappingconsumer.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef EndpointMappingConsumerService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ EndpointMappingConsumer port = service.getEndpointMappingConsumerPort();
+ int ret = port.add(1, 2);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EndpointMappingConsumer add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl
new file mode 100644
index 0000000..3bdf383
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService.wsdl
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2-hudson-132-M1. --><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/EndpointMappingConsumer" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" targetNamespace="http://example.web.service/EndpointMappingConsumer" name="EndpointMappingConsumerService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/EndpointMappingConsumer" schemaLocation="EndpointMappingConsumerService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <portType name="EndpointMappingConsumer">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="EndpointMappingConsumerPortBinding" type="tns:EndpointMappingConsumer">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="EndpointMappingConsumerService">
+ <port name="EndpointMappingConsumerPort" binding="tns:EndpointMappingConsumerPortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd
new file mode 100644
index 0000000..6306313
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EndpointMappingConsumerService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/EndpointMappingConsumer" xmlns:tns="http://example.web.service/EndpointMappingConsumer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="tns:add"/>
+
+ <xs:element name="addResponse" type="tns:addResponse"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd
new file mode 100644
index 0000000..6306313
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/endpoint_mapping_consumer/webclient/client/wsdl/EnpointMappingConsumerService_schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/EndpointMappingConsumer" xmlns:tns="http://example.web.service/EndpointMappingConsumer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="tns:add"/>
+
+ <xs:element name="addResponse" type="tns:addResponse"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/build.xml
new file mode 100644
index 0000000..fe440c0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/build.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="EntApp-ejb" default="default" basedir="." xmlns:ejbjarproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
+ <description>Builds, tests, and runs the project EntApp-ejb.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ pre-init: called before initialization of project properties
+ post-init: called after initialization of project properties
+ pre-compile: called before javac compilation
+ post-compile: called after javac compilation
+ pre-compile-single: called before javac compilation of single file
+ post-compile-single: called after javac compilation of single file
+ pre-dist: called before jar building
+ post-dist: called after jar building
+ post-clean: called after cleaning build products
+ pre-run-deploy: called before deploying
+ post-run-deploy: called after deploying
+
+ Example of pluging an obfuscator after the compilation could look like
+
+ <target name="post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Other way how to customize the build is by overriding existing main targets.
+ The target of interest are:
+
+ init-macrodef-javac: defines macro for javac compilation
+ init-macrodef-debug: defines macro for class debugging
+ do-dist: jar archive building
+ run: execution of project
+ javadoc-build: javadoc generation
+
+ Example of overriding the target for project execution could look like
+
+ <target name="run" depends="<PROJNAME>-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that overridden target depends on jar target and not only on
+ compile target as regular run target does. Again, for list of available
+ properties which you can use check the target you are overriding in
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/ant-deploy.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/ant-deploy.xml
new file mode 100644
index 0000000..144d630
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/ant-deploy.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project default="-deploy-ant" basedir=".">
+ <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <property file="${deploy.ant.properties.file}" />
+ <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+ <available file="${deploy.ant.resource.dir}" property="has.setup"/>
+ <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
+ <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/>
+ </target>
+
+ <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
+ <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
+ <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
+ <!-- The doctype triggers resolution which can fail -->
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+ <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+ </replace>
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
+ <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
+ </replace>
+ <xmlproperty file="${temp.sun.web}" validate="false">
+ </xmlproperty>
+ <delete file="${temp.sun.web}"/>
+ <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/>
+ </target>
+ <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
+ <tempfile prefix="sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>
+ <mkdir dir="${sjsas.resources.dir}"/>
+ <mkdir dir="${sjsas.resources.dir}/META-INF"/>
+ <property name="sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>
+ <property name="lefty" value="<"/>
+
+ <property name="righty" value=">"/>
+ <concat destfile="${sjsas.resources.file}">${lefty}?xml version="1.0" encoding="UTF-8"?${righty}
+${lefty}!DOCTYPE resources PUBLIC
+ "-//Sun Microsystems Inc.//DTD Application Server 9.0 Resource Definitions //EN"
+ "${sjsas.root}/lib/dtds/sun-resources_1_2.dtd"${righty}
+${lefty}resources${righty}
+${lefty}/resources${righty}
+ </concat>
+ <concat append="true" destfile="${sjsas.resources.file}">
+ <fileset dir="${deploy.ant.resource.dir}"/>
+ </concat>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+<?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+ <?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[transaction-isolation-level="JDBC Driver Default"]]></replacetoken>
+ </replace>
+ <!-- work-around 434 and its variants -->
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[<description/>]]></replacetoken>
+ </replace>
+ <!-- do the right thing for Topics and Queues.
+ Need fix for TopicConnectionFactory and QueueConnectionfactory -->
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[<jms-resource ]]></replacetoken>
+ <replacevalue><![CDATA[<admin-object-resource res-adapter="jmsra" ]]></replacevalue>
+ </replace>
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[</jms-resource>]]></replacetoken>
+ <replacevalue><![CDATA[</admin-object-resource>]]></replacevalue>
+ </replace>
+ <jar destfile="${deploy.ant.archive}" update="true">
+ <fileset dir="${sjsas.resources.dir}"/>
+ </jar>
+ <delete dir="${sjsas.resources.dir}"/>
+ </target>
+ <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+ <echo message="Deploying ${deploy.ant.archive}"/>
+ <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-deploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+ <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-undeploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/build-impl.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/build-impl.xml
new file mode 100644
index 0000000..62135aa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/build-impl.xml
@@ -0,0 +1,532 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - dist
+ - execution
+ - debugging
+ - javadoc
+ - cleanup
+
+ -->
+<project name="EntApp-ejb-impl" default="build" basedir=".." xmlns:ejbjarproject3="http://www.netbeans.org/ns/j2ee-ejbjarproject/3" xmlns:ejbjarproject2="http://www.netbeans.org/ns/j2ee-ejbjarproject/2" xmlns:ejbjarproject1="http://www.netbeans.org/ns/j2ee-ejbjarproject/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
+ <import file="ant-deploy.xml"/>
+ <target name="default" depends="dist,javadoc" description="Build whole project."/>
+ <!--
+ INITIALIZATION SECTION
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-userdir" depends="-pre-init,-init-private">
+ <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private,-init-userdir">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-userdir,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-init-macrodef-property">
+ <!-- Ensure configuration directory exists. -->
+ <mkdir dir="${meta.inf}"/>
+ <property name="runmain.jvmargs" value=""/>
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
+ <condition property="classes.dir" value="${build.ear.classes.dir}">
+ <isset property="dist.ear.dir"/>
+ </condition>
+ <property name="classes.dir" value="${build.classes.dir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <condition property="no.dist.ear.dir">
+ <not>
+ <isset property="dist.ear.dir"/>
+ </not>
+ </condition>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="build.generated.dir">Must set build.generated.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}:${j2ee.platform.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property name="javac.compilerargs" value=""/>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" includes="@{includes}"/>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ <path path="${j2ee.platform.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}">
+ <jvmarg line="${runmain.jvmargs}"/>
+ <classpath>
+ <path path="${build.classes.dir}:${javac.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none" else="-Xdebug">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ </target>
+ <target name="-init-macrodef-debug" depends="-init-debug-args">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="args" default="${application.args}"/>
+ <sequential>
+ <java fork="true" classname="@{classname}">
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <arg line="@{args}"/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-userdir,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug"/>
+ <!--
+ COMPILATION SECTION
+ -->
+ <target name="-deps-module-jar" depends="init" if="no.dist.ear.dir" unless="no.deps"/>
+ <target name="-deps-ear-jar" depends="init" if="dist.ear.dir" unless="no.deps"/>
+ <target name="deps-jar" depends="init, -deps-module-jar, -deps-ear-jar"/>
+ <target name="wsgen-init" depends="init">
+ <mkdir dir="${build.generated.dir}/wsgen/service"/>
+ <mkdir dir="${classes.dir}"/>
+ <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
+ <classpath path="${j2ee.platform.wsgen.classpath}"/>
+ </taskdef>
+ </target>
+ <target name="wsgen-HelloEJB" depends="wsgen-init, compile">
+ <wsgen sourcedestdir="${build.generated.dir}/wsgen/service" resourcedestdir="${build.generated.dir}/wsgen/service" keep="false" genwsdl="true" sei="entapp.ejb.HelloEJB">
+ <classpath path="${classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
+ </wsgen>
+ </target>
+ <target name="wsgen-generate" depends="wsgen-HelloEJB"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${build.ear.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="library-inclusion-in-archive" depends="compile"/>
+ <target name="library-inclusion-in-manifest" depends="compile">
+ <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
+ </target>
+ <target name="-copy-meta-inf">
+ <copy todir="${classes.dir}">
+ <fileset dir="${meta.inf}" includes="**/*.dbschema"/>
+ </copy>
+ <copy todir="${classes.dir}/META-INF">
+ <fileset dir="${meta.inf}" excludes="**/*.dbschema **/xml-resources/** ${meta.inf.excludes}"/>
+ </copy>
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-copy-meta-inf" if="have.sources">
+ <ejbjarproject2:javac destdir="${classes.dir}"/>
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <ejbjarproject2:javac>
+ <customize>
+ <include name="${javac.includes}"/>
+ </customize>
+ </ejbjarproject2:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ DIST BUILDING SECTION
+ -->
+ <target name="-pre-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-dist-with-manifest" depends="init,compile,-pre-dist,library-inclusion-in-archive" if="has.custom.manifest">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.jar}" compress="${jar.compress}" manifest="${build.classes.dir}/META-INF/MANIFEST.MF">
+ <fileset dir="${build.classes.dir}"/>
+ </jar>
+ </target>
+ <target name="-do-dist-without-manifest" depends="init,compile,-pre-dist,library-inclusion-in-archive" unless="has.custom.manifest">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ </jar>
+ </target>
+ <target name="-do-dist" depends="init,compile,-pre-dist,library-inclusion-in-archive, -do-dist-without-manifest, -do-dist-with-manifest"/>
+ <target name="-do-ear-dist" depends="init,compile,-pre-dist,library-inclusion-in-manifest">
+ <dirname property="dist.jar.dir" file="${dist.ear.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.ear.jar}" compress="${jar.compress}" manifest="${build.ear.classes.dir}/META-INF/MANIFEST.MF">
+ <fileset dir="${build.ear.classes.dir}"/>
+ </jar>
+ </target>
+ <target name="-post-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="dist" depends="init,compile,-pre-dist,-do-dist,-post-dist" description="Build distribution (JAR)."/>
+ <target name="dist-ear" depends="init,compile,-pre-dist,-do-ear-dist,-post-dist" description="Build distribution (JAR) to be packaged into an EAR."/>
+ <!--
+ EXECUTION SECTION
+ -->
+ <target name="run" depends="run-deploy" description="Deploy to server."/>
+ <target name="-init-deploy">
+ <property name="include.jar.manifest" value=""/>
+ </target>
+ <target name="pre-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="post-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-pre-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
+ </target>
+ <target name="-post-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
+ </target>
+ <target name="-run-deploy-am">
+ <!-- Task to deploy to the Access Manager runtime. -->
+ </target>
+ <target name="run-deploy" depends="init,-init-deploy,compile,library-inclusion-in-archive,dist,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy"/>
+ <target name="-run-deploy-nb" if="netbeans.home">
+ <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}"/>
+ </target>
+ <target name="-init-deploy-ant" unless="netbeans.home">
+ <property name="deploy.ant.archive" value="${dist.jar}"/>
+ <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
+ <property name="deploy.ant.enabled" value="true"/>
+ </target>
+ <target name="run-undeploy" depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant"/>
+ <target name="-run-undeploy-nb" if="netbeans.home">
+ <fail message="Undeploy is not supported from within the IDE"/>
+ </target>
+ <target name="verify" depends="dist">
+ <nbverify file="${dist.jar}"/>
+ </target>
+ <target name="run-main" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <ejbjarproject3:java classname="${run.class}"/>
+ </target>
+ <!--
+ DEBUGGING SECTION
+ -->
+ <target name="debug" description="Debug project in IDE." depends="init,compile,dist" if="netbeans.home">
+ <nbdeploy debugmode="true"/>
+ <antcall target="connect-debugger"/>
+ </target>
+ <target name="connect-debugger" unless="is.debugged">
+ <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
+ <classpath>
+ <path path="${debug.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <path path="${web.docbase.dir}"/>
+ </sourcepath>
+ </nbjpdaconnect>
+ </target>
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <ejbjarproject1:nbjpdastart/>
+ </target>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="main.class">Must select one file in the IDE or set main.class</fail>
+ <ejbjarproject1:debug/>
+ </target>
+ <target name="debug-single-main" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <ejbjarproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ JAVADOC SECTION
+ -->
+ <target name="javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,javadoc-build,javadoc-browse" description="Build Javadoc."/>
+ <!--
+ JUNIT COMPILATION SECTION
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <ejbjarproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <ejbjarproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </ejbjarproject2:javac>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ JUNIT EXECUTION SECTION
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <ejbjarproject2:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <ejbjarproject2:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ JUNIT DEBUGGING SECTION
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <ejbjarproject1:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}" args="${test.class}"/>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <ejbjarproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <ejbjarproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ CLEANUP SECTION
+ -->
+ <target name="deps-clean" depends="init" if="no.dist.ear.dir" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+ <target name="clean-ear" depends="clean"/>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/genfiles.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/genfiles.properties
new file mode 100644
index 0000000..2e75d09
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/genfiles.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.xml.data.CRC32=2b429b24
+build.xml.jax-ws.CRC32=11653f59
+build.xml.script.CRC32=6550ade5
+build.xml.stylesheet.CRC32=997c846c
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=2b429b24
+nbproject/build-impl.xml.jax-ws.CRC32=11653f59
+nbproject/build-impl.xml.script.CRC32=e441fb44
+nbproject/build-impl.xml.stylesheet.CRC32=5a2c94db
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/jax-ws.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/jax-ws.xml
new file mode 100644
index 0000000..2eb3b7b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/jax-ws.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jax-ws xmlns="http://www.netbeans.org/ns/jax-ws/1">
+ <services>
+ <service name="HelloEJB">
+ <implementation-class>entapp.ejb.HelloEJB</implementation-class>
+ </service>
+ </services>
+ <clients/>
+</jax-ws>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.properties
new file mode 100644
index 0000000..1df9f9e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.properties
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2017, 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
+#
+
+deploy.ant.properties.file=/home/bhavani/.netbeans/dev/glassfish.properties
+j2ee.platform.classpath=/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/jsf-impl.jar:/workspace/appserver/publish/glassfish/lib/activation.jar:/workspace/appserver/publish/glassfish/lib/appserv-tags.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar
+j2ee.platform.wscompile.classpath=/workspace/appserver/publish/glassfish/lib/j2ee.jar:/workspace/appserver/publish/glassfish/lib/saaj-api.jar:/workspace/appserver/publish/glassfish/lib/saaj-impl.jar:/workspace/appserver/publish/glassfish/lib/jaxrpc-api.jar:/workspace/appserver/publish/glassfish/lib/jaxrpc-impl.jar:/workspace/appserver/publish/glassfish/lib/endorsed/jaxp-api.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar
+j2ee.platform.wsgen.classpath=/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/tools.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/activation.jar
+j2ee.platform.wsimport.classpath=/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/tools.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/activation.jar
+j2ee.platform.wsit.classpath=
+j2ee.server.instance=[/workspace/appserver/publish/glassfish]deployer:Sun:AppServer::localhost:4848
+netbeans.user=/home/bhavani/.netbeans/dev
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.xml
new file mode 100644
index 0000000..bc91159
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/private/private.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
+</project-private>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.properties
new file mode 100644
index 0000000..ac01e9b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.properties
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.classes.dir=${build.dir}/jar
+build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
+build.dir=build
+build.ear.classes.dir=${build.dir}/ear-module
+build.generated.dir=${build.dir}/generated
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=${javac.classpath}:${build.classes.dir}
+debug.test.classpath=\
+ ${run.test.classpath}
+dist.dir=dist
+dist.ear.jar=${dist.dir}/${jar.name}
+dist.jar=${dist.dir}/${jar.name}
+dist.javadoc.dir=${dist.dir}/javadoc
+j2ee.platform=1.5
+j2ee.server.type=J2EE
+jar.compress=false
+jar.name=EntApp-ejb.jar
+javac.classpath=
+javac.debug=true
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.preview=true
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+meta.inf=${source.root}/conf
+meta.inf.excludes=sun-cmp-mappings.xml
+platform.active=default_platform
+resource.dir=setup
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.root=src
+src.dir=${source.root}/java
+test.src.dir=test
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.xml
new file mode 100644
index 0000000..680f973
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/nbproject/project.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.j2ee.ejbjarproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
+ <name>EntApp-ejb</name>
+ <minimum-ant-version>1.6</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir" name="Source Packages"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir" name="Test Packages"/>
+ </test-roots>
+ </data>
+ </configuration>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/sun-ejb-jar.xml
new file mode 100644
index 0000000..e177895
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/conf/sun-ejb-jar.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans/>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/java/entapp/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/java/entapp/ejb/HelloEJB.java
new file mode 100644
index 0000000..8f5c256
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-ejb/src/java/entapp/ejb/HelloEJB.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * HelloEJB.java
+ *
+ * Created on July 27, 2007, 9:06 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package entapp.ejb;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+/**
+ *
+ * @author bhavani
+ */
+
+@Stateless()
+@WebService()
+public class HelloEJB {
+
+ /**
+ * Web service operation
+ */
+ @WebMethod
+ public String sayHello(@WebParam(name = "name")
+ String name) {
+ String hello = "Hello from HelloEJB - " + name;
+ System.out.println(hello);
+ return hello;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/build.xml
new file mode 100644
index 0000000..a151ac1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/build.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="EntApp-war" default="default" basedir=".">
+ <description>Builds, tests, and runs the project EntApp-war.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-dist: called before jar building
+ -post-dist: called after jar building
+ -post-clean: called after cleaning build products
+ -pre-run-deploy: called before deploying
+ -post-run-deploy: called after deploying
+
+ Example of pluging an obfuscator after the compilation could look like
+
+ <target name="post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Other way how to customize the build is by overriding existing main targets.
+ The target of interest are:
+
+ init-macrodef-javac: defines macro for javac compilation
+ init-macrodef-junit: defines macro for junit execution
+ init-macrodef-debug: defines macro for class debugging
+ do-dist: jar archive building
+ run: execution of project
+ javadoc-build: javadoc generation
+
+ Example of overriding the target for project execution could look like
+
+ <target name="run" depends="<PROJNAME>-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that overridden target depends on jar target and not only on
+ compile target as regular run target does. Again, for list of available
+ properties which you can use check the target you are overriding in
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/ant-deploy.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/ant-deploy.xml
new file mode 100644
index 0000000..144d630
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/ant-deploy.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project default="-deploy-ant" basedir=".">
+ <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <property file="${deploy.ant.properties.file}" />
+ <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+ <available file="${deploy.ant.resource.dir}" property="has.setup"/>
+ <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
+ <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/>
+ </target>
+
+ <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
+ <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
+ <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
+ <!-- The doctype triggers resolution which can fail -->
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+ <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+ </replace>
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
+ <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
+ </replace>
+ <xmlproperty file="${temp.sun.web}" validate="false">
+ </xmlproperty>
+ <delete file="${temp.sun.web}"/>
+ <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/>
+ </target>
+ <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
+ <tempfile prefix="sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>
+ <mkdir dir="${sjsas.resources.dir}"/>
+ <mkdir dir="${sjsas.resources.dir}/META-INF"/>
+ <property name="sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>
+ <property name="lefty" value="<"/>
+
+ <property name="righty" value=">"/>
+ <concat destfile="${sjsas.resources.file}">${lefty}?xml version="1.0" encoding="UTF-8"?${righty}
+${lefty}!DOCTYPE resources PUBLIC
+ "-//Sun Microsystems Inc.//DTD Application Server 9.0 Resource Definitions //EN"
+ "${sjsas.root}/lib/dtds/sun-resources_1_2.dtd"${righty}
+${lefty}resources${righty}
+${lefty}/resources${righty}
+ </concat>
+ <concat append="true" destfile="${sjsas.resources.file}">
+ <fileset dir="${deploy.ant.resource.dir}"/>
+ </concat>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+<?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+ <?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[transaction-isolation-level="JDBC Driver Default"]]></replacetoken>
+ </replace>
+ <!-- work-around 434 and its variants -->
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[<description/>]]></replacetoken>
+ </replace>
+ <!-- do the right thing for Topics and Queues.
+ Need fix for TopicConnectionFactory and QueueConnectionfactory -->
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[<jms-resource ]]></replacetoken>
+ <replacevalue><![CDATA[<admin-object-resource res-adapter="jmsra" ]]></replacevalue>
+ </replace>
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[</jms-resource>]]></replacetoken>
+ <replacevalue><![CDATA[</admin-object-resource>]]></replacevalue>
+ </replace>
+ <jar destfile="${deploy.ant.archive}" update="true">
+ <fileset dir="${sjsas.resources.dir}"/>
+ </jar>
+ <delete dir="${sjsas.resources.dir}"/>
+ </target>
+ <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+ <echo message="Deploying ${deploy.ant.archive}"/>
+ <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-deploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+ <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-undeploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/build-impl.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/build-impl.xml
new file mode 100644
index 0000000..3b4a7cb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/build-impl.xml
@@ -0,0 +1,778 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!--
+ *** GENERATED FROM project.xml - DO NOT EDIT ***
+ *** EDIT ../build.xml INSTEAD ***
+
+ For the purpose of easier reading the script
+ is divided into following sections:
+ - initialization
+ - compilation
+ - dist
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - cleanup
+
+ -->
+<project name="EntApp-war-impl" default="build" basedir=".." xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1" xmlns:webproject1="http://www.netbeans.org/ns/web-project/1">
+ <import file="ant-deploy.xml"/>
+ <target name="default" depends="dist,javadoc" description="Build whole project."/>
+ <!--
+ INITIALIZATION SECTION
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-ear-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir">
+ <property value="${build.ear.web.dir}/META-INF" name="build.meta.inf.dir"/>
+ <property name="build.classes.dir.real" value="${build.ear.classes.dir}"/>
+ <property name="build.web.dir.real" value="${build.ear.web.dir}"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-do-ear-init">
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="javac.compilerargs" value=""/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <condition property="no.dist.ear.dir">
+ <not>
+ <isset property="dist.ear.dir"/>
+ </not>
+ </condition>
+ <property name="build.web.excludes" value="${build.classes.excludes}"/>
+ <condition property="do.compile.jsps">
+ <istrue value="${compile.jsps}"/>
+ </condition>
+ <condition property="do.display.browser">
+ <istrue value="${display.browser}"/>
+ </condition>
+ <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
+ <available file="${conf.dir}/persistence.xml" property="has.persistence.xml"/>
+ <condition property="do.war.package.with.custom.manifest">
+ <and>
+ <istrue value="${war.package}"/>
+ <isset property="has.custom.manifest"/>
+ </and>
+ </condition>
+ <condition property="do.war.package.without.custom.manifest">
+ <and>
+ <istrue value="${war.package}"/>
+ <not>
+ <isset property="has.custom.manifest"/>
+ </not>
+ </and>
+ </condition>
+ <property value="${build.web.dir}/META-INF" name="build.meta.inf.dir"/>
+ <property name="build.classes.dir.real" value="${build.classes.dir}"/>
+ <property name="build.web.dir.real" value="${build.web.dir}"/>
+ <condition property="application.args.param" value="${application.args}" else="">
+ <and>
+ <isset property="application.args"/>
+ <not>
+ <equals arg1="${application.args}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="build.web.dir">Must set build.web.dir</fail>
+ <fail unless="build.generated.dir">Must set build.generated.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.war">Must set dist.war</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir.real}"/>
+ <attribute name="classpath" default="${javac.classpath}:${j2ee.platform.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" includes="@{includes}"/>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}">
+ <jvmarg line="${runmain.jvmargs}"/>
+ <classpath>
+ <path path="${build.classes.dir.real}:${javac.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="dir" default="${build.classes.dir.real}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none" else="-Xdebug">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ </target>
+ <target name="-init-macrodef-debug" depends="-init-debug-args">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="args" default="${application.args.param}"/>
+ <sequential>
+ <java fork="true" classname="@{classname}">
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${runmain.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <arg line="@{args}"/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-copy-ear-war">
+ <macrodef name="copy-ear-war">
+ <attribute name="file"/>
+ <attribute name="propname"/>
+ <sequential>
+ <basename property="base_@{propname}" file="@{file}"/>
+ <zipfileset id="tld.files_@{propname}" src="@{file}" includes="META-INF/*.tld META-INF/tlds/*.tld"/>
+ <pathconvert property="tld.files.path_@{propname}" refid="tld.files_@{propname}"/>
+ <condition value="yes" property="hastlds_@{propname}">
+ <contains string="${tld.files.path_@{propname}}" substring=".tld" casesensitive="false"/>
+ </condition>
+ <condition value="${build.web.dir.real}/WEB-INF/lib" property="copy.to.dir_@{propname}">
+ <isset property="hastlds_@{propname}"/>
+ </condition>
+ <condition value="${dist.ear.dir}" property="copy.to.dir_@{propname}">
+ <not>
+ <isset property="hastlds_@{propname}"/>
+ </not>
+ </condition>
+ <copy file="@{file}" todir="${copy.to.dir_@{propname}}"/>
+ <condition value="${base_@{propname}}" property="@{propname}">
+ <not>
+ <isset property="hastlds_@{propname}"/>
+ </not>
+ </condition>
+ <condition value="" property="@{propname}">
+ <isset property="hastlds_@{propname}"/>
+ </condition>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-copy-ear-war"/>
+ <!--
+ COMPILATION SECTION
+ -->
+ <target name="deps-module-jar" depends="init" if="no.dist.ear.dir" unless="no.deps">
+ <ant target="dist" inheritall="false" antfile="${project.EntApp-ejb}/build.xml"/>
+ </target>
+ <target name="deps-ear-jar" depends="init" if="dist.ear.dir" unless="no.deps">
+ <ant target="dist-ear" inheritall="false" antfile="${project.EntApp-ejb}/build.xml">
+ <property name="dist.ear.dir" location="${build.dir}"/>
+ </ant>
+ </target>
+ <target name="deps-jar" depends="init, deps-module-jar, deps-ear-jar" unless="no.deps"/>
+ <target name="wsgen-init" depends="init">
+ <mkdir dir="${build.generated.dir}/wsgen/service"/>
+ <mkdir dir="${build.classes.dir.real}"/>
+ <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
+ <classpath path="${j2ee.platform.wsgen.classpath}"/>
+ </taskdef>
+ </target>
+ <target name="wsgen-HelloWeb" depends="wsgen-init, compile">
+ <wsgen sourcedestdir="${build.generated.dir}/wsgen/service" resourcedestdir="${build.generated.dir}/wsgen/service" keep="false" genwsdl="true" sei="entapp.web.HelloWeb">
+ <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir.real}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
+ </wsgen>
+ </target>
+ <target name="wsgen-generate" depends="wsgen-HelloWeb"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir.real}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-copy-webdir">
+ <copy todir="${build.web.dir.real}">
+ <fileset excludes="${build.web.excludes}" dir="${web.docbase.dir}"/>
+ </copy>
+ <copy todir="${build.web.dir.real}/WEB-INF">
+ <fileset excludes="${build.web.excludes}" dir="${webinf.dir}"/>
+ </copy>
+ </target>
+ <target name="-init-rest" if="rest.support.on">
+ <taskdef name="restapt" classname="com.sun.ws.rest.tools.ant.RestBeansProcessorTask">
+ <classpath>
+ <path path="${j2ee.platform.classpath}"/>
+ </classpath>
+ </taskdef>
+ </target>
+ <target name="-rest-pre-compile" depends="-init-rest" if="rest.support.on">
+ <mkdir dir="${build.generated.dir}/rest-gen"/>
+ <restapt fork="true" xEndorsed="true" sourcePath="${src.dir}" nocompile="false" destdir="${build.classes.dir.real}" sourcedestdir="${build.generated.dir}/rest-gen">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ <path path="${libs.jaxws20.classpath}"/>
+ <path path="${j2ee.platform.classpath}"/>
+ <pathelement location="${build.web.dir}/WEB-INF/classes"/>
+ </classpath>
+ <source dir="${src.dir}">
+ <include name="**/*.java"/>
+ </source>
+ </restapt>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-do-compile" depends="init, deps-jar, -pre-pre-compile, -pre-compile, -rest-pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources">
+ <webproject2:javac destdir="${build.classes.dir.real}"/>
+ <copy todir="${build.classes.dir.real}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-copy-manifest" if="has.custom.manifest">
+ <mkdir dir="${build.meta.inf.dir}"/>
+ <copy todir="${build.meta.inf.dir}">
+ <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
+ </copy>
+ </target>
+ <target name="-copy-persistence-xml" if="has.persistence.xml">
+ <mkdir dir="${build.web.dir.real}/WEB-INF/classes/META-INF"/>
+ <copy todir="${build.web.dir.real}/WEB-INF/classes/META-INF">
+ <fileset dir="${conf.dir}" includes="persistence.xml"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <webproject2:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </webproject2:javac>
+ <copy todir="${build.classes.dir.real}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <target name="compile-jsps" depends="compile" if="do.compile.jsps" description="Test compile JSP pages to expose compilation errors.">
+ <mkdir dir="${build.generated.dir}/src"/>
+ <java classname="org.netbeans.modules.web.project.ant.JspC" fork="true" failonerror="true">
+ <arg value="-uriroot"/>
+ <arg file="${basedir}/${build.web.dir.real}"/>
+ <arg value="-d"/>
+ <arg file="${basedir}/${build.generated.dir}/src"/>
+ <arg value="-die1"/>
+ <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
+ </java>
+ <mkdir dir="${build.generated.dir}/classes"/>
+ <webproject2:javac srcdir="${build.generated.dir}/src" destdir="${build.generated.dir}/classes" classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}"/>
+ </target>
+ <target name="-do-compile-single-jsp" depends="compile" if="jsp.includes">
+ <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
+ <mkdir dir="${build.generated.dir}/src"/>
+ <java classname="org.netbeans.modules.web.project.ant.JspCSingle" fork="true" failonerror="true">
+ <arg value="-uriroot"/>
+ <arg file="${basedir}/${build.web.dir.real}"/>
+ <arg value="-d"/>
+ <arg file="${basedir}/${build.generated.dir}/src"/>
+ <arg value="-die1"/>
+ <arg value="-jspc.files"/>
+ <arg path="${jsp.includes}"/>
+ <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
+ </java>
+ <mkdir dir="${build.generated.dir}/classes"/>
+ <webproject2:javac srcdir="${build.generated.dir}/src" destdir="${build.generated.dir}/classes" classpath="${j2ee.platform.classpath}:${build.classes.dir.real}:${jspcompilation.classpath}">
+ <customize>
+ <patternset includes="${javac.jsp.includes}"/>
+ </customize>
+ </webproject2:javac>
+ </target>
+ <target name="compile-single-jsp">
+ <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
+ <antcall target="-do-compile-single-jsp"/>
+ </target>
+ <!--
+ DIST BUILDING SECTION
+ -->
+ <target name="-pre-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-dist-without-manifest" if="do.war.package.without.custom.manifest" depends="init,compile,compile-jsps,-pre-dist">
+ <dirname property="dist.jar.dir" file="${dist.war}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.war}" compress="${jar.compress}">
+ <fileset dir="${build.web.dir.real}"/>
+ </jar>
+ </target>
+ <target name="-do-dist-with-manifest" if="do.war.package.with.custom.manifest" depends="init,compile,compile-jsps,-pre-dist">
+ <dirname property="dist.jar.dir" file="${dist.war}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar manifest="${build.meta.inf.dir}/MANIFEST.MF" jarfile="${dist.war}" compress="${jar.compress}">
+ <fileset dir="${build.web.dir.real}"/>
+ </jar>
+ </target>
+ <target name="do-dist" depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest"/>
+ <target name="library-inclusion-in-manifest" depends="init" if="dist.ear.dir">
+ <basename property="included.lib.reference.EntApp-ejb.dist" file="${reference.EntApp-ejb.dist}"/>
+ <copy-ear-war file="${reference.EntApp-ejb.dist}" propname="included.lib.reference.EntApp-ejb.dist.X"/>
+ <mkdir dir="${build.web.dir.real}/META-INF"/>
+ <manifest file="${build.web.dir.real}/META-INF/MANIFEST.MF" mode="update">
+ <attribute name="Class-Path" value="${included.lib.reference.EntApp-ejb.dist} "/>
+ </manifest>
+ <delete dir="${dist.ear.dir}/temp"/>
+ </target>
+ <target name="library-inclusion-in-archive" depends="init" unless="dist.ear.dir">
+ <copy file="${reference.EntApp-ejb.dist}" todir="${build.web.dir.real}/WEB-INF/lib"/>
+ </target>
+ <target name="do-ear-dist" depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest">
+ <dirname property="dist.jar.dir" file="${dist.ear.war}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.ear.war}" compress="${jar.compress}" manifest="${build.web.dir.real}/META-INF/MANIFEST.MF">
+ <fileset dir="${build.web.dir.real}"/>
+ </jar>
+ </target>
+ <target name="-post-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="dist" depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)."/>
+ <target name="dist-ear" depends="init,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR."/>
+ <!--
+ EXECUTION SECTION
+ -->
+ <target name="run" depends="run-deploy,run-display-browser" description="Deploy to server and show in browser."/>
+ <target name="-pre-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-post-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-pre-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
+ </target>
+ <target name="-post-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
+ </target>
+ <target name="-run-deploy-am">
+ <!-- Task to deploy to the Access Manager runtime. -->
+ </target>
+ <target name="run-deploy" depends="init,compile,compile-jsps,-do-compile-single-jsp,dist,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy"/>
+ <target name="-run-deploy-nb" if="netbeans.home">
+ <nbdeploy debugmode="false" clientUrlPart="${client.urlPart}" forceRedeploy="${forceRedeploy}"/>
+ </target>
+ <target name="-init-deploy-ant" unless="netbeans.home">
+ <property name="deploy.ant.archive" value="${dist.war}"/>
+ <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
+ <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
+ <property name="deploy.ant.enabled" value="true"/>
+ </target>
+ <target name="run-undeploy" depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant"/>
+ <target name="-run-undeploy-nb" if="netbeans.home">
+ <fail message="Undeploy is not supported from within the IDE"/>
+ </target>
+ <target name="verify" depends="init,dist">
+ <nbverify file="${dist.war}"/>
+ </target>
+ <target name="run-display-browser" depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl"/>
+ <target name="-init-display-browser" if="do.display.browser">
+ <condition property="do.display.browser.nb">
+ <isset property="netbeans.home"/>
+ </condition>
+ <condition property="do.display.browser.cl">
+ <isset property="deploy.ant.enabled"/>
+ </condition>
+ </target>
+ <target name="-display-browser-nb" if="do.display.browser.nb">
+ <nbbrowse url="${client.url}"/>
+ </target>
+ <target name="-get-browser" if="do.display.browser.cl" unless="browser">
+ <condition property="browser" value="rundll32">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser.args" value="url.dll,FileProtocolHandler" else="">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/open">
+ <os family="mac"/>
+ </condition>
+ <property environment="env"/>
+ <condition property="browser" value="${env.BROWSER}">
+ <isset property="env.BROWSER"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/firefox">
+ <available file="/usr/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/local/firefox/firefox">
+ <available file="/usr/local/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/mozilla">
+ <available file="/usr/bin/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/local/mozilla/mozilla">
+ <available file="/usr/local/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
+ <available file="/usr/sfw/lib/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/firefox">
+ <available file="/opt/csw/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
+ <available file="/usr/sfw/lib/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/mozilla">
+ <available file="/opt/csw/bin/mozilla"/>
+ </condition>
+ </target>
+ <target name="-display-browser-cl" depends="-get-browser" if="do.display.browser.cl">
+ <fail unless="browser">
+ Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
+ </fail>
+ <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
+ <echo>Launching ${browse.url}</echo>
+ <exec executable="${browser}" spawn="true">
+ <arg line="${browser.args} ${browse.url}"/>
+ </exec>
+ </target>
+ <target name="run-main" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <webproject1:java classname="${run.class}"/>
+ </target>
+ <target name="test-restbeans" depends="run-deploy,-init-display-browser">
+ <replace file="${restbeans.test.file}" token="${base.url.token}" value="${client.url}"/>
+ <nbbrowse url="${restbeans.test.url}"/>
+ </target>
+ <!--
+ DEBUGGING SECTION
+ -->
+ <target name="debug" description="Debug project in IDE." depends="init,compile,compile-jsps,-do-compile-single-jsp,dist" if="netbeans.home">
+ <nbdeploy debugmode="true" clientUrlPart="${client.urlPart}"/>
+ <antcall target="connect-debugger"/>
+ <antcall target="debug-display-browser"/>
+ </target>
+ <target name="connect-debugger" unless="is.debugged">
+ <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
+ <classpath>
+ <path path="${debug.classpath}:${ws.debug.classpaths}"/>
+ </classpath>
+ <sourcepath>
+ <path path="${web.docbase.dir}:${ws.web.docbase.dirs}"/>
+ </sourcepath>
+ </nbjpdaconnect>
+ </target>
+ <target name="debug-display-browser" if="do.display.browser">
+ <nbbrowse url="${client.url}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile,compile-jsps,-do-compile-single-jsp,debug"/>
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <webproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <webproject1:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single-main" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <webproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ JAVADOC SECTION
+ -->
+ <target name="javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,javadoc-build,javadoc-browse" description="Build Javadoc."/>
+ <!--
+
+ JUNIT COMPILATION SECTION
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <webproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <webproject2:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}:${j2ee.platform.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </webproject2:javac>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="**/*.java"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+
+ JUNIT EXECUTION SECTION
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <webproject2:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <webproject2:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+
+ JUNIT DEBUGGING SECTION
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <webproject1:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}" args="${test.class}"/>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <webproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+
+ CLEANUP SECTION
+ -->
+ <target name="deps-clean" depends="init" if="no.dist.ear.dir" unless="no.deps">
+ <ant target="clean" inheritall="false" antfile="${project.EntApp-ejb}/build.xml"/>
+ </target>
+ <target name="do-clean" depends="init">
+ <condition value="${build.web.dir.real}" property="build.dir.to.clean">
+ <isset property="dist.ear.dir"/>
+ </condition>
+ <property value="${build.web.dir.real}" name="build.dir.to.clean"/>
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
+ </delete>
+ <delete dir="${build.dir}"/>
+ <available file="${build.dir.to.clean}/WEB-INF/lib" type="dir" property="status.clean-failed"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="check-clean" depends="do-clean" if="status.clean-failed">
+ <echo message="Warning: unable to delete some files in ${build.web.dir.real}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
+ <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products."/>
+ <target name="clean-ear" depends="clean" description="Clean build products."/>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/genfiles.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/genfiles.properties
new file mode 100644
index 0000000..c812bbe
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/genfiles.properties
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.xml.data.CRC32=7c117a6f
+build.xml.jax-ws.CRC32=80988e3f
+build.xml.script.CRC32=b6f73158
+build.xml.stylesheet.CRC32=e4ec34a3
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=7c117a6f
+nbproject/build-impl.xml.jax-ws.CRC32=80988e3f
+nbproject/build-impl.xml.script.CRC32=e0c8c369
+nbproject/build-impl.xml.stylesheet.CRC32=73308ca4
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/jax-ws.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/jax-ws.xml
new file mode 100644
index 0000000..2bfa333
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/jax-ws.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jax-ws xmlns="http://www.netbeans.org/ns/jax-ws/1">
+ <services>
+ <service name="HelloWeb">
+ <implementation-class>entapp.web.HelloWeb</implementation-class>
+ </service>
+ </services>
+ <clients/>
+</jax-ws>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.properties
new file mode 100644
index 0000000..9af888c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.properties
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2017, 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
+#
+
+deploy.ant.properties.file=/home/bhavani/.netbeans/dev/glassfish.properties
+j2ee.platform.classpath=/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/jsf-impl.jar:/workspace/appserver/publish/glassfish/lib/activation.jar:/workspace/appserver/publish/glassfish/lib/appserv-tags.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar
+j2ee.platform.is.jsr109=true
+j2ee.platform.wscompile.classpath=/workspace/appserver/publish/glassfish/lib/j2ee.jar:/workspace/appserver/publish/glassfish/lib/saaj-api.jar:/workspace/appserver/publish/glassfish/lib/saaj-impl.jar:/workspace/appserver/publish/glassfish/lib/jaxrpc-api.jar:/workspace/appserver/publish/glassfish/lib/jaxrpc-impl.jar:/workspace/appserver/publish/glassfish/lib/endorsed/jaxp-api.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar
+j2ee.platform.wsgen.classpath=/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/tools.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/activation.jar
+j2ee.platform.wsimport.classpath=/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/tools.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/activation.jar
+j2ee.platform.wsit.classpath=
+j2ee.server.instance=[/workspace/appserver/publish/glassfish]deployer:Sun:AppServer::localhost:4848
+user.properties.file=/home/bhavani/.netbeans/dev/build.properties
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.xml
new file mode 100644
index 0000000..bc91159
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/private/private.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
+</project-private>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.properties
new file mode 100644
index 0000000..c6c1769
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.properties
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.classes.dir=${build.web.dir}/WEB-INF/classes
+build.classes.excludes=**/*.java,**/*.form
+build.dir=build
+build.ear.classes.dir=${build.ear.web.dir}/WEB-INF/classes
+build.ear.web.dir=${build.dir}/ear-module
+build.generated.dir=${build.dir}/generated
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+build.web.dir=${build.dir}/web
+build.web.excludes=${build.classes.excludes}
+client.urlPart=
+compile.jsps=false
+conf.dir=${source.root}/conf
+debug.classpath=${javac.classpath}:${build.classes.dir}:${build.ear.classes.dir}
+debug.test.classpath=\
+ ${run.test.classpath}
+display.browser=true
+dist.dir=dist
+dist.ear.war=${dist.dir}/${war.ear.name}
+dist.javadoc.dir=${dist.dir}/javadoc
+dist.war=${dist.dir}/${war.name}
+j2ee.platform=1.5
+j2ee.server.type=J2EE
+jar.compress=false
+javac.classpath=\
+ ${reference.EntApp-ejb.dist}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.debug=true
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.preview=true
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
+lib.dir=${web.docbase.dir}/WEB-INF/lib
+no.dependencies=false
+platform.active=default_platform
+project.EntApp-ejb=../EntApp-ejb
+reference.EntApp-ejb.dist=${project.EntApp-ejb}/dist/EntApp-ejb.jar
+resource.dir=setup
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+# Space-separated list of JVM arguments used when running class with main method
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
+runmain.jvmargs=
+source.root=src
+src.dir=${source.root}/java
+test.src.dir=test
+war.content.additional=
+war.ear.name=EntApp-war.war
+war.name=EntApp-war.war
+war.package=true
+web.docbase.dir=web
+webinf.dir=${web.docbase.dir}/WEB-INF
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.xml
new file mode 100644
index 0000000..4392f3a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/nbproject/project.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.web.project</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/web-project/3">
+ <name>EntApp-war</name>
+ <minimum-ant-version>1.6</minimum-ant-version>
+ <web-module-libraries>
+ <library files="1">
+ <file>${reference.EntApp-ejb.dist}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ </web-module-libraries>
+ <web-module-additional-libraries/>
+ <source-roots>
+ <root id="src.dir" name="Source Packages"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir" name="Test Packages"/>
+ </test-roots>
+ </data>
+ <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+ <reference>
+ <foreign-project>EntApp-ejb</foreign-project>
+ <artifact-type>jar</artifact-type>
+ <script>build.xml</script>
+ <target>dist</target>
+ <clean-target>clean</clean-target>
+ <id>dist</id>
+ </reference>
+ </references>
+ </configuration>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/conf/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/conf/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/conf/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/java/entapp/web/HelloWeb.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/java/entapp/web/HelloWeb.java
new file mode 100644
index 0000000..15ab967
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/src/java/entapp/web/HelloWeb.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * HelloWeb.java
+ *
+ * Created on July 27, 2007, 9:07 AM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package entapp.web;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+/**
+ *
+ * @author bhavani
+ */
+@WebService()
+public class HelloWeb {
+
+ /**
+ * Web service operation
+ */
+ @WebMethod
+ public String sayHello(@WebParam(name = "name")
+ String name) {
+ String hello = "Hello from HelloWeb - " + name;
+ System.out.println(hello);
+ return hello;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/sun-web.xml
new file mode 100644
index 0000000..4a5fcff
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/sun-web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app error-url="">
+ <context-root>/EntApp-war</context-root>
+ <class-loader delegate="true"/>
+ <jsp-config>
+ <property name="keepgenerated" value="true">
+ <description>Keep a copy of the generated servlet class' java code.</description>
+ </property>
+ </jsp-config>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/web.xml
new file mode 100644
index 0000000..fc67e0c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/WEB-INF/web.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <session-config>
+ <session-timeout>
+ 30
+ </session-timeout>
+ </session-config>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ </web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/index.jsp b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/index.jsp
new file mode 100644
index 0000000..645195e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/EntApp-war/web/index.jsp
@@ -0,0 +1,54 @@
+<%--
+
+ 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
+
+--%>
+
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%--
+The taglib directive below imports the JSTL library. If you uncomment it,
+you must also add the JSTL library to the project. The Add Library... action
+on Libraries node in Projects view can be used to add the JSTL 1.1 library.
+--%>
+<%--
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+--%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>JSP Page</title>
+ </head>
+ <body>
+
+ <h1>JSP Page</h1>
+
+ <%--
+ This example uses JSTL, uncomment the taglib directive above.
+ To test, display the page like this: index.jsp?sayHello=true&name=Murphy
+ --%>
+ <%--
+ <c:if test="${param.sayHello}">
+ <!-- Let's welcome the user ${param.name} -->
+ Hello ${param.name}!
+ </c:if>
+ --%>
+
+ </body>
+</html>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/build.xml
new file mode 100644
index 0000000..768e2c3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/build.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="EntApp" default="default" basedir="." xmlns:ear="http://www.netbeans.org/ns/j2ee-earproject/2">
+ <description>Builds, tests, and runs the project EntApp.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ pre-init: called before initialization of project properties
+ post-init: called after initialization of project properties
+ pre-compile: called before javac compilation
+ post-compile: called after javac compilation
+ pre-dist: called before jar building
+ post-dist: called after jar building
+ post-clean: called after cleaning build products
+ pre-run-deploy: called before deploying
+ post-run-deploy: called after deploying
+
+ Example of pluging an obfuscator after the compilation could look like
+
+ <target name="post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Other way how to customize the build is by overriding existing main targets.
+ The target of interest are:
+
+ do-dist: jar archive building
+ run: execution of project
+
+ Example of overriding the target for project execution could look like
+
+ <target name="run" depends="<PROJNAME>-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that overridden target depends on jar target and not only on
+ compile target as regular run target does. Again, for list of available
+ properties which you can use check the target you are overriding in
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/ant-deploy.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/ant-deploy.xml
new file mode 100644
index 0000000..144d630
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/ant-deploy.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project default="-deploy-ant" basedir=".">
+ <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <property file="${deploy.ant.properties.file}" />
+ <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
+ <available file="${deploy.ant.resource.dir}" property="has.setup"/>
+ <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
+ <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/>
+ </target>
+
+ <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
+ <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
+ <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
+ <!-- The doctype triggers resolution which can fail -->
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
+ <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
+ </replace>
+ <replace file="${temp.sun.web}">
+ <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
+ <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
+ </replace>
+ <xmlproperty file="${temp.sun.web}" validate="false">
+ </xmlproperty>
+ <delete file="${temp.sun.web}"/>
+ <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/>
+ </target>
+ <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
+ <tempfile prefix="sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>
+ <mkdir dir="${sjsas.resources.dir}"/>
+ <mkdir dir="${sjsas.resources.dir}/META-INF"/>
+ <property name="sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>
+ <property name="lefty" value="<"/>
+
+ <property name="righty" value=">"/>
+ <concat destfile="${sjsas.resources.file}">${lefty}?xml version="1.0" encoding="UTF-8"?${righty}
+${lefty}!DOCTYPE resources PUBLIC
+ "-//Sun Microsystems Inc.//DTD Application Server 9.0 Resource Definitions //EN"
+ "${sjsas.root}/lib/dtds/sun-resources_1_2.dtd"${righty}
+${lefty}resources${righty}
+${lefty}/resources${righty}
+ </concat>
+ <concat append="true" destfile="${sjsas.resources.file}">
+ <fileset dir="${deploy.ant.resource.dir}"/>
+ </concat>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+<?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[</resources>
+ <?xml version="1.0" encoding="UTF-8"?>
+<resources>]]></replacetoken>
+ </replace>
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[transaction-isolation-level="JDBC Driver Default"]]></replacetoken>
+ </replace>
+ <!-- work-around 434 and its variants -->
+ <replace file="${sjsas.resources.file}" value="">
+ <replacetoken><![CDATA[<description/>]]></replacetoken>
+ </replace>
+ <!-- do the right thing for Topics and Queues.
+ Need fix for TopicConnectionFactory and QueueConnectionfactory -->
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[<jms-resource ]]></replacetoken>
+ <replacevalue><![CDATA[<admin-object-resource res-adapter="jmsra" ]]></replacevalue>
+ </replace>
+ <replace file="${sjsas.resources.file}">
+ <replacetoken><![CDATA[</jms-resource>]]></replacetoken>
+ <replacevalue><![CDATA[</admin-object-resource>]]></replacevalue>
+ </replace>
+ <jar destfile="${deploy.ant.archive}" update="true">
+ <fileset dir="${sjsas.resources.dir}"/>
+ </jar>
+ <delete dir="${sjsas.resources.dir}"/>
+ </target>
+ <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
+ <echo message="Deploying ${deploy.ant.archive}"/>
+ <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-deploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+ <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
+ <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
+ classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
+ <sun-appserv-undeploy user="${sjsas.username}"
+ passwordfile="${sjsas.password.file}"
+ host="${sjsas.host}" port="${sjsas.port}"
+ file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
+ <delete file="${sjsas.password.file}"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/build-impl.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/build-impl.xml
new file mode 100644
index 0000000..cd5c7cf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/build-impl.xml
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - dist
+ - execution
+ - debugging
+ - cleanup
+
+-->
+<project name="EntApp-impl" default="build" basedir=".." xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2">
+ <import file="ant-deploy.xml"/>
+ <target name="default" depends="dist" description="Build whole project."/>
+ <!--
+ INITIALIZATION SECTION
+ -->
+ <target name="pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="init-private" depends="pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="init-userdir" depends="pre-init,init-private">
+ <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
+ </target>
+ <target name="init-user" depends="pre-init,init-private,init-userdir">
+ <property file="${user.properties.file}"/>
+ </target>
+ <target name="init-project" depends="pre-init,init-private,init-userdir,init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="do-init" depends="pre-init,init-private,init-userdir,init-user,init-project">
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ <condition property="do.compile.jsps">
+ <istrue value="${compile.jsps}"/>
+ </condition>
+ <condition property="do.display.browser">
+ <and>
+ <istrue value="${display.browser}"/>
+ <contains string="${client.module.uri}" substring=".war"/>
+ </and>
+ </condition>
+ <available property="has.custom.manifest" file="${meta.inf}/MANIFEST.MF"/>
+ <condition property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}" else="">
+ <and>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}" else="">
+ <and>
+ <isset property="j2ee.appclient.jvmoptions"/>
+ <not>
+ <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="application.args.param" value="${application.args}" else="">
+ <and>
+ <isset property="application.args"/>
+ <not>
+ <equals arg1="${application.args}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="can.debug.appclient">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="app.client"/>
+ </and>
+ </condition>
+ </target>
+ <target name="post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="init-check" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init">
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="build.generated.dir">Must set build.generated.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="init" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check"/>
+ <!--
+ COMPILATION SECTION
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="deps-j2ee-archive" depends="init" unless="no.deps">
+ <ant target="dist-ear" inheritall="false" antfile="${project.EntApp-ejb}/build.xml">
+ <property name="dist.ear.dir" location="${build.dir}"/>
+ </ant>
+ <ant target="dist-ear" inheritall="false" antfile="${project.EntApp-war}/build.xml">
+ <property name="dist.ear.dir" location="${build.dir}"/>
+ </ant>
+ </target>
+ <target name="pre-pre-compile" depends="init,deps-jar,deps-j2ee-archive"/>
+ <target name="pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="do-compile" depends="init,deps-jar,pre-pre-compile,pre-compile">
+ <copy todir="${build.dir}/META-INF">
+ <fileset dir="${meta.inf}"/>
+ </copy>
+ <copy file="${reference.EntApp-ejb.dist-ear}" todir="${build.dir}//"/>
+ <copy file="${reference.EntApp-war.dist-ear}" todir="${build.dir}//"/>
+ </target>
+ <target name="post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project."/>
+ <!--
+ DIST BUILDING SECTION
+ -->
+ <target name="pre-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="do-dist-without-manifest" depends="init,compile,pre-dist" unless="has.custom.manifest">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.dir}"/>
+ </jar>
+ </target>
+ <target name="do-dist-with-manifest" depends="init,compile,pre-dist" if="has.custom.manifest">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar jarfile="${dist.jar}" compress="${jar.compress}" manifest="${meta.inf}/MANIFEST.MF">
+ <fileset dir="${build.dir}"/>
+ </jar>
+ </target>
+ <target name="post-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="dist" depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)."/>
+ <!--
+ EXECUTION SECTION
+ -->
+ <target name="run" depends="run-deploy,run-display-browser,run-ac" description="Deploy to server."/>
+ <target name="pre-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="post-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-pre-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
+ </target>
+ <target name="-post-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
+ </target>
+ <target name="-run-deploy-am" unless="no.deps">
+ <!-- Task to deploy to the Access Manager runtime. -->
+ <ant target="-run-deploy-am" inheritall="false" antfile="${project.EntApp-ejb}/build.xml"/>
+ <ant target="-run-deploy-am" inheritall="false" antfile="${project.EntApp-war}/build.xml"/>
+ </target>
+ <target name="run-deploy" depends="dist,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy"/>
+ <target name="-run-deploy-nb" if="netbeans.home">
+ <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
+ </target>
+ <target name="-init-deploy-ant" unless="netbeans.home">
+ <property name="deploy.ant.archive" value="${dist.jar}"/>
+ <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
+ <property name="deploy.ant.enabled" value="true"/>
+ </target>
+ <target name="run-undeploy" depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant"/>
+ <target name="-run-undeploy-nb" if="netbeans.home">
+ <fail message="Undeploy is not supported from within the IDE"/>
+ </target>
+ <target name="verify" depends="dist">
+ <nbverify file="${dist.jar}"/>
+ </target>
+ <target name="run-display-browser" depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl"/>
+ <target name="-init-display-browser" if="do.display.browser">
+ <condition property="do.display.browser.nb">
+ <isset property="netbeans.home"/>
+ </condition>
+ <condition property="do.display.browser.cl">
+ <and>
+ <isset property="deploy.ant.enabled"/>
+ <isset property="deploy.ant.client.url"/>
+ </and>
+ </condition>
+ </target>
+ <target name="-display-browser-nb" if="do.display.browser.nb">
+ <nbbrowse url="${client.url}"/>
+ </target>
+ <target name="-get-browser" if="do.display.browser.cl" unless="browser">
+ <condition property="browser" value="rundll32">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser.args" value="url.dll,FileProtocolHandler" else="">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/open">
+ <os family="mac"/>
+ </condition>
+ <property environment="env"/>
+ <condition property="browser" value="${env.BROWSER}">
+ <isset property="env.BROWSER"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/firefox">
+ <available file="/usr/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/local/firefox/firefox">
+ <available file="/usr/local/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/mozilla">
+ <available file="/usr/bin/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/local/mozilla/mozilla">
+ <available file="/usr/local/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
+ <available file="/usr/sfw/lib/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/firefox">
+ <available file="/opt/csw/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
+ <available file="/usr/sfw/lib/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/mozilla">
+ <available file="/opt/csw/bin/mozilla"/>
+ </condition>
+ </target>
+ <target name="-display-browser-cl" depends="-get-browser" if="do.display.browser.cl">
+ <fail unless="browser">
+ Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
+ </fail>
+ <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
+ <echo>Launching ${browse.url}</echo>
+ <exec executable="${browser}" spawn="true">
+ <arg line="${browser.args} ${browse.url}"/>
+ </exec>
+ </target>
+ <target name="run-ac" depends="init" if="app.client">
+ <antcall target="run-${app.client}"/>
+ </target>
+ <target name="-as-retrieve-option-workaround" if="j2ee.appclient.mainclass.args" unless="j2ee.clientName">
+ <property name="client.jar" value="${dist.dir}/EntAppClient.jar"/>
+ <sleep seconds="3"/>
+ <copy file="${wa.copy.client.jar.from}/EntApp/EntAppClient.jar" todir="${dist.dir}"/>
+ </target>
+ <!--
+ DEBUGGING SECTION
+ -->
+ <target name="debug" depends="run-debug,run-display-browser,run-debug-appclient" description="Deploy to server."/>
+ <target name="run-debug" description="Debug project in IDE." depends="dist" if="netbeans.home" unless="app.client">
+ <nbdeploy debugmode="true" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
+ <antcall target="connect-debugger"/>
+ </target>
+ <target name="connect-debugger" unless="is.debugged">
+ <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
+ <classpath>
+ <path path="${debug.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <path path="${ear.docbase.dirs}"/>
+ </sourcepath>
+ </nbjpdaconnect>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none" else="-Xdebug">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ </target>
+ <target name="run-debug-appclient" depends="init,-init-debug-args" if="can.debug.appclient">
+ <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
+ <attribute name="mainclass"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <attribute name="args" default="${application.args.param}"/>
+ <sequential>
+ <parallel>
+ <java fork="true" classname="@{mainclass}">
+ <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
+ <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
+ <arg line="@{args}"/>
+ <classpath>
+ <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
+ <classpath>
+ <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
+ <path path="@{classpath}"/>
+ </classpath>
+ <sourcepath>
+ <path path="${src.dir}"/>
+ </sourcepath>
+ </nbjpdaconnect>
+ </parallel>
+ </sequential>
+ </macrodef>
+ <nbdeploy debugmode="false" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
+ <antcall target="debug-${app.client}"/>
+ </target>
+ <!--
+ CLEANUP SECTION
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps">
+ <ant target="clean-ear" inheritall="false" antfile="${project.EntApp-ejb}/build.xml">
+ <property name="dist.ear.dir" location="${build.dir}"/>
+ </ant>
+ <ant target="clean-ear" inheritall="false" antfile="${project.EntApp-war}/build.xml">
+ <property name="dist.ear.dir" location="${build.dir}"/>
+ </ant>
+ </target>
+ <target name="do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${build.dir}"/>
+ </target>
+ <target name="post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,do-clean,post-clean" description="Clean build products."/>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/genfiles.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/genfiles.properties
new file mode 100644
index 0000000..9c84b25
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/genfiles.properties
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.xml.data.CRC32=552f9222
+build.xml.script.CRC32=091afd04
+build.xml.stylesheet.CRC32=978fa8b5
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=552f9222
+nbproject/build-impl.xml.script.CRC32=458a01cd
+nbproject/build-impl.xml.stylesheet.CRC32=ffbde67e
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/private/private.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/private/private.properties
new file mode 100644
index 0000000..13b860e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/private/private.properties
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2017, 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
+#
+
+deploy.ant.properties.file=/home/bhavani/.netbeans/dev/glassfish.properties
+j2ee.appclient.tool.args=-configxml "/workspace/appserver/publish/glassfish/domains/domain1/config/sun-acc.xml"
+j2ee.appclient.tool.jvmoptions=-Dcom.sun.aas.configRoot="/workspace/appserver/publish/glassfish/config" -Dcom.sun.aas.installRoot="/workspace/appserver/publish/glassfish" -Dcom.sun.aas.imqLib="/workspace/appserver/publish/glassfish/imq/lib" -Djava.security.policy="/workspace/appserver/publish/glassfish/lib/appclient/client.policy" -Djava.security.auth.login.config="/workspace/appserver/publish/glassfish/lib/appclient/appclientlogin.conf" -Djava.endorsed.dirs="/workspace/appserver/publish/glassfish/lib/endorsed" -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser -Djava.util.logging.manager=com.sun.enterprise.server.logging.ACCLogManager
+j2ee.appclient.tool.mainclass=com.sun.enterprise.appclient.Main
+j2ee.appclient.tool.runtime=/workspace/appserver/publish/glassfish/lib/dom.jar:/workspace/appserver/publish/glassfish/lib/xalan.jar:/workspace/appserver/publish/glassfish/lib/xercesImpl.jar:/workspace/appserver/publish/glassfish/lib/appserv-rt.jar:/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/j2ee.jar:/workspace/appserver/publish/glassfish/lib/jmac-api.jar:/workspace/appserver/publish/glassfish/lib/appserv-ext.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/activation.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar:/workspace/appserver/publish/glassfish/lib/jaxrpc-impl.jar:/workspace/appserver/publish/glassfish/lib/saaj-impl.jar:/workspace/appserver/publish/glassfish/lib/jaxr-impl.jar:/workspace/appserver/publish/glassfish/lib/relaxngDatatype.jar:/workspace/appserver/publish/glassfish/lib/xsdlib.jar:/workspace/appserver/publish/glassfish/lib/appserv-cmp.jar:/workspace/appserver/publish/glassfish/javadb/lib/derbyclient.jar:/workspace/appserver/publish/glassfish/lib/toplink-essentials.jar:/workspace/appserver/publish/glassfish/lib/dbschema.jar:/workspace/appserver/publish/glassfish/lib/appserv-admin.jar:/workspace/appserver/publish/glassfish/lib/install/applications/jmsra/imqjmsra.jar:/workspace/appserver/publish/glassfish/lib/fscontext.jar:/workspace/appserver/publish/glassfish/lib/dtds:/workspace/appserver/publish/glassfish/lib/schemas
+j2ee.platform.classpath=/workspace/appserver/publish/glassfish/lib/javaee.jar:/workspace/appserver/publish/glassfish/lib/jsf-impl.jar:/workspace/appserver/publish/glassfish/lib/activation.jar:/workspace/appserver/publish/glassfish/lib/appserv-tags.jar:/workspace/appserver/publish/glassfish/lib/mail.jar:/workspace/appserver/publish/glassfish/lib/appserv-jstl.jar:/workspace/appserver/publish/glassfish/lib/webservices-tools.jar:/workspace/appserver/publish/glassfish/lib/webservices-rt.jar:/workspace/appserver/publish/glassfish/lib/appserv-ws.jar
+j2ee.server.instance=[/workspace/appserver/publish/glassfish]deployer:Sun:AppServer::localhost:4848
+netbeans.user=/home/bhavani/.netbeans/dev
+wa.copy.client.jar.from=/workspace/appserver/publish/glassfish/domains/domain1/generated/xml/j2ee-apps
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.properties
new file mode 100644
index 0000000..038980a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.properties
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2017, 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
+#
+
+build.classes.excludes=**/*.java,**/*.form,**/.nbattrs
+build.dir=build
+build.generated.dir=${build.dir}/generated
+client.module.uri=EntApp-war
+client.urlPart=
+debug.classpath=${javac.classpath}::${jar.content.additional}:${run.classpath}
+display.browser=true
+dist.dir=dist
+dist.jar=${dist.dir}/EntApp.ear
+j2ee.appclient.mainclass.args=-client ${dist.jar} ${j2ee.appclient.tool.args}
+j2ee.platform=1.5
+j2ee.server.type=J2EE
+jar.compress=false
+jar.content.additional=\
+ ${reference.EntApp-ejb.dist-ear}:\
+ ${reference.EntApp-war.dist-ear}
+jar.name=EntApp.ear
+javac.debug=true
+javac.deprecation=false
+javac.source=1.5
+javac.target=1.5
+meta.inf=src/conf
+no.dependencies=false
+platform.active=default_platform
+project.EntApp-ejb=EntApp-ejb
+project.EntApp-war=EntApp-war
+reference.EntApp-ejb.dist-ear=${project.EntApp-ejb}/dist/EntApp-ejb.jar
+reference.EntApp-war.dist-ear=${project.EntApp-war}/dist/EntApp-war.war
+resource.dir=setup
+source.root=.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.xml
new file mode 100644
index 0000000..710ca1e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/nbproject/project.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.j2ee.earproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2ee-earproject/2">
+ <name>EntApp</name>
+ <minimum-ant-version>1.6</minimum-ant-version>
+ <web-module-libraries/>
+ <web-module-additional-libraries>
+ <library files="1">
+ <file>${reference.EntApp-ejb.dist-ear}</file>
+ <path-in-war>/</path-in-war>
+ </library>
+ <library files="1">
+ <file>${reference.EntApp-war.dist-ear}</file>
+ <path-in-war>/</path-in-war>
+ </library>
+ </web-module-additional-libraries>
+ </data>
+ <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+ <reference>
+ <foreign-project>EntApp-ejb</foreign-project>
+ <artifact-type>j2ee_ear_archive</artifact-type>
+ <script>build.xml</script>
+ <target>dist-ear</target>
+ <clean-target>clean-ear</clean-target>
+ <id>dist-ear</id>
+ </reference>
+ <reference>
+ <foreign-project>EntApp-war</foreign-project>
+ <artifact-type>j2ee_ear_archive</artifact-type>
+ <script>build.xml</script>
+ <target>dist-ear</target>
+ <clean-target>clean-ear</clean-target>
+ <id>dist-ear</id>
+ </reference>
+ </references>
+ </configuration>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/MANIFEST.MF
new file mode 100644
index 0000000..59499bc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/application.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/application.xml
new file mode 100644
index 0000000..dcc26ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/application.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
+ <display-name>EntApp</display-name>
+ <module>
+ <ejb>EntApp-ejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>EntApp-war.war</web-uri>
+ <context-root>/EntApp-war</context-root>
+ </web>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/sun-application.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/sun-application.xml
new file mode 100644
index 0000000..7693199
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/EntApp/src/conf/sun-application.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Java EE Application 5.0//EN" "http://www.sun.com/software/appserver/dtds/sun-application_5_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.properties
new file mode 100644
index 0000000..068f84e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+ Don't rename jdk.home as java.home
+jdk.home=${env.JAVA_HOME}
+server.dir=${env.S1AS_HOME}
+ent.app=EntApp
+src.dir=EntApp
+ejb.module=EntApp-ejb
+web.module=EntApp-war
+ejb.webservice.class=entapp.ejb.HelloEJB
+web.webservice.class=entapp.web.HelloWeb
+ejb.webservice.name=HelloEJB
+web.webservice.name=HelloWeb
+domain.dir=${server.dir}/domains/domain1
+serviceengine.dir=${domain.dir}/jbi/components/sun-javaee-engine/install_root
+ejb.path=${domain.dir}/applications/j2ee-modules/${ejb.module}
+output.dir=${serviceengine.dir}/workspace
+asadmin.command=${server.dir}/bin/asadmin
+client.classpath=".:build:${env.S1AS_HOME}/lib/activation.jar:${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.xml
new file mode 100644
index 0000000..d5b0f47
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/build.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<project name="Plain EJB invocation from JBI" default="all" basedir=".">
+
+ <property environment="env"/>
+ <property file="build.properties"/>
+
+ <target name="all" depends="clean, setup, runtest, undeploy">
+ <antcall target="clean"/>
+ </target>
+
+
+ <target name="setup">
+ <antcall target="compile-entapp"/>
+ <antcall target="wsgen-sun-http-binding"/>
+ <antcall target="build-serviceassembly"/>
+ <antcall target="deploy-serviceassembly"/>
+ </target>
+
+ <target name="runtest">
+
+ <!-- Build the client -->
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-d"/>
+ <arg line="build"/>
+ <arg line="-keep"/>
+ <arg line="service-assembly/sun-http-binding/${ejb.webservice.name}Service.wsdl"/>
+ </exec>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-d"/>
+ <arg line="build"/>
+ <arg line="-keep"/>
+ <arg line="service-assembly/sun-http-binding/${web.webservice.name}Service.wsdl"/>
+ </exec>
+
+ <javac srcdir="client" includes="Client.java" destdir="build" classpath="${client.classpath}" debug="true"/>
+
+ <java classname="client.Client" classpath="${client.classpath}" fork="true"/>
+
+ </target>
+
+ <target name="clean">
+
+ <exec dir="${ent.app}" executable="${env.ANT_HOME}/bin/ant">
+ <arg line="clean"/>
+ </exec>
+
+ <delete dir="build"/>
+
+ <delete includeemptydirs="true" failonerror="false">
+ <fileset dir="service-assembly/sun-http-binding" includes="*.wsdl, *.xsd"/>
+ <fileset dir="service-assembly/sun-http-binding/entapp"/>
+ </delete>
+
+ </target>
+
+ <target name="undeploy">
+ <antcall target="undeploy-serviceassembly"/>
+ </target>
+
+ <target name="compile-entapp">
+ <exec dir="${ent.app}" executable="${env.ANT_HOME}/bin/ant"/>
+ <!--
+ <ant dir="${ent.app}"/>
+ -->
+
+ <!-- Add jbi.xml file to the .ear file -->
+ <jar destfile="${ent.app}/dist/EntApp.ear"
+ basedir="service-assembly/sun-javaee-engine"
+ includes="META-INF/jbi.xml"
+ update="true"
+ />
+ </target>
+
+ <target name="wsgen-sun-http-binding">
+ <!-- generate WSDL for the EJB web service -->
+ <exec executable="${env.S1AS_HOME}/bin/wsgen">
+ <arg line="-cp"/>
+ <arg line="${ent.app}/${ejb.module}/build/ear-module"/>
+ <arg line="${ejb.webservice.class}"/>
+ <arg line="-wsdl"/>
+ <arg line="-d"/>
+ <arg line="service-assembly/sun-http-binding"/>
+ </exec>
+ <!-- Replace REPLACE_WITH_ACTUAL_URL with some value -->
+ <replace file="service-assembly/sun-http-binding/${ejb.webservice.name}Service.wsdl">
+ <replacetoken>REPLACE_WITH_ACTUAL_URL</replacetoken>
+ <replacevalue>http://localhost:12000/entapp/ejb/HelloEJB</replacevalue>
+ </replace>
+
+ <!-- generate WSDL for the Servlet web service -->
+ <exec executable="${env.S1AS_HOME}/bin/wsgen">
+ <arg line="-cp"/>
+ <arg line="${ent.app}/${web.module}/build/ear-module/WEB-INF/classes"/>
+ <arg line="${web.webservice.class}"/>
+ <arg line="-wsdl"/>
+ <arg line="-d"/>
+ <arg line="service-assembly/sun-http-binding"/>
+ </exec>
+ <!-- Replace REPLACE_WITH_ACTUAL_URL with some value -->
+ <replace file="service-assembly/sun-http-binding/${web.webservice.name}Service.wsdl">
+ <replacetoken>REPLACE_WITH_ACTUAL_URL</replacetoken>
+ <replacevalue>http://localhost:12000/entapp/web/HelloEJB</replacevalue>
+ </replace>
+
+ </target>
+
+ <target name="build-serviceassembly">
+ <mkdir dir="build"/>
+
+ <!-- Build the service unit & assembly jars -->
+ <jar destfile="build/sun-http-binding.jar"
+ basedir="service-assembly/sun-http-binding"
+ includes="*.wsdl, *.xsd, META-INF/jbi.xml"
+ />
+ <jar destfile="build/EntApp.zip"
+ basedir="build"
+ includes="sun-http-binding.jar"
+ />
+ <jar destfile="build/EntApp.zip"
+ update="true"
+ basedir="${ent.app}/dist"
+ includes="EntApp.ear"
+ />
+ <jar destfile="build/EntApp.zip"
+ basedir="service-assembly"
+ includes="META-INF/jbi.xml"
+ update="true"
+ />
+ </target>
+
+ <target name="deploy-serviceassembly">
+ <exec executable="${asadmin.command}">
+ <arg line="deploy-jbi-service-assembly"/>
+ <arg line="build/EntApp.zip"/>
+ </exec>
+ <exec executable="${asadmin.command}">
+ <arg line="start-jbi-service-assembly"/>
+ <arg line="EntApp"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-serviceassembly">
+ <exec executable="${asadmin.command}">
+ <arg line="stop-jbi-service-assembly"/>
+ <arg line="EntApp"/>
+ </exec>
+ <exec executable="${asadmin.command}">
+ <arg line="shut-down-jbi-service-assembly"/>
+ <arg line="EntApp"/>
+ </exec>
+ <exec executable="${asadmin.command}">
+ <arg line="undeploy-jbi-service-assembly"/>
+ <arg line="EntApp"/>
+ </exec>
+ </target>
+
+ <target name="restart-ejbmodule">
+ <exec executable="${asadmin.command}">
+ <arg line="disable"/>
+ <arg line="${ejb.module}"/>
+ </exec>
+ <exec executable="${asadmin.command}">
+ <arg line="enable"/>
+ <arg line="${ejb.module}"/>
+ </exec>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/client/Client.java
new file mode 100755
index 0000000..656138f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/client/Client.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import entapp.ejb.*;
+import entapp.web.*;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/service_unit/enterprise_app";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ Client client = new Client();
+ client.invoke();
+ stat.printSummary(testId );
+ }
+
+ private void invoke() {
+ try {
+
+ HelloEJBService helloEJBService = new HelloEJBService();
+ HelloEJB port = helloEJBService.getHelloEJBPort();
+ String hello = port.sayHello("Bhavani");
+ System.out.println("Output :: " + hello);
+
+ HelloWebService helloWebService = new HelloWebService();
+ HelloWeb webPort = helloWebService.getHelloWebPort();
+ hello = webPort.sayHello("Bhavani");
+ System.out.println("Output :: " + hello);
+
+ stat.addStatus(testId, stat.PASS);
+
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ stat.addStatus(testId, stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/META-INF/jbi.xml
new file mode 100644
index 0000000..9962281
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/META-INF/jbi.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:tns="http://glassfish.samples.sun.com/"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <name>EntApp</name>
+ <description>EntApp</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>EntApp_provider</name>
+ <description>provider service for Enterprise App endpoints</description>
+ </identification>
+ <target>
+ <artifacts-zip>EntApp.ear</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>EntApp-consumer</name>
+ <description>consumer service for Enterprise App endpoints</description>
+ </identification>
+ <target>
+ <artifacts-zip>sun-http-binding.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-http-binding/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-http-binding/META-INF/jbi.xml
new file mode 100644
index 0000000..9bd2a21
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-http-binding/META-INF/jbi.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:ejb="http://ejb.entapp/"
+ xmlns:web="http://web.entapp/"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="ejb:HelloEJBService"
+ service-name="ejb:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <consumes interface-name="web:HelloWebService"
+ service-name="web:HelloWebService"
+ endpoint-name="HelloWebPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-javaee-engine/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-javaee-engine/META-INF/jbi.xml
new file mode 100644
index 0000000..53b12f0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/service_unit/enterprise_app/service-assembly/sun-javaee-engine/META-INF/jbi.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:ejb="http://ejb.entapp/"
+ xmlns:web="http://web.entapp/"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <provides interface-name="ejb:HelloEJBService"
+ service-name="ejb:HelloEJBService"
+ endpoint-name="HelloEJBPort"/>
+ <provides interface-name="web:HelloWebService"
+ service-name="web:HelloWebService"
+ endpoint-name="HelloWebPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/README
new file mode 100644
index 0000000..e0b593a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/README
@@ -0,0 +1 @@
+Client <-----> servicemix-http <------> NMR <------> Java EE Service Engine <----> Webservice
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.properties
new file mode 100644
index 0000000..ac59642
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.properties
@@ -0,0 +1,30 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="provider_su"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./endpoint/web.xml"/>
+<property name="jbi-component-su-assembly" value="sample_service_assembly"/>
+<property name="http-soap-bc-su" value="consumer_su"/>
+<property name="http-soap-bc-su-dir" value="service_assembly/service_units/soap-bc-su"/>
+<property name="javaee-se-su" value="provider_su"/>
+<property name="javaee-se-su-dir" value="service_assembly/service_units/javaee-se-su"/>
+<property name="servicemix-autodeploy-dir" value="${env.S1AS_HOME}/domains/domain1/applications/j2ee-modules/servicemix-web/deploy"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.xml
new file mode 100644
index 0000000..de94c36
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/build.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, deploy, runtest, undeploy, clean"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete file="${basedir}/service_assembly/${appname}.war"/>
+ <delete file="${basedir}/service_assembly/${http-soap-bc-su}.jar"/>
+ <delete file="${basedir}/service_assembly/${jbi-component-su-assembly}.zip"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+
+ <!-- Step1. Build the provider service unit -->
+ <echo message="classes dir = ${build.classes.dir}"/>
+ <echo message="assemble.dir = ${assemble.dir}/${appname}.war"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}.war"/>
+ </antcall>
+ <!-- Add META-INF/jbi.xml to .war file -->
+ <mkdir dir="${build.classes.dir}/tmp/META-INF"/>
+ <echo message="created dir = ${build.classes.dir}/tmp/META-INF"/>
+ <copy file="${javaee-se-su-dir}/META-INF/jbi.xml" tofile="${build.classes.dir}/tmp/META-INF/jbi.xml"/>
+ <jar jarfile="${assemble.dir}/${appname}.war" update="true">
+ <fileset dir="${build.classes.dir}/tmp">
+ <include name="META-INF/jbi.xml"/>
+ </fileset>
+ </jar>
+ <!-- Copy the JavaEE app to the service assembly -->
+ <copy file="${assemble.dir}/${appname}.war" todir="${basedir}/service_assembly"/>
+
+ <!-- Step2. Build the consumer service unit -->
+ <jar jarfile="${basedir}/service_assembly/${http-soap-bc-su}.jar">
+ <fileset dir="${basedir}/service_assembly/service_units/soap-bc-su">
+ <!-- <include name="xbean.xml"/> -->
+ <include name="META-INF/jbi.xml"/>
+ <include name="CalculatorService.wsdl"/>
+ <include name="CalculatorService_schema1.xsd"/>
+ </fileset>
+ </jar>
+
+ <!-- Step2. Build the service assembly -->
+ <zip destfile="${basedir}/service_assembly/${jbi-component-su-assembly}.zip" basedir="${basedir}/service_assembly">
+ <include name="META-INF/jbi.xml"/>
+ <include name="${http-soap-bc-su}.jar"/>
+ <include name="${javaee-se-su}.war"/>
+ </zip>
+
+ </target>
+
+ <target name="install" depends="init-common">
+ <copy file="${env.S1AS_HOME}/jbi/sharedlibraries/wsdl/installer/wsdlsl.jar" todir="${servicemix-autodeploy-dir}"/>
+ <echo message="Installing SunWSDLSharedLibrary..."/>
+ <sleep seconds="10"/>
+ <copy file="${env.S1AS_HOME}/jbi/components/javaeeserviceengine/installer/appserv-jbise.jar" todir="${servicemix-autodeploy-dir}"/>
+ <echo message="Installing Java EE Service Engine..."/>
+ <sleep seconds="15"/>
+ </target>
+
+ <target name="uninstall" depends="init-common">
+ <delete file="${servicemix-autodeploy-dir}/appserv-jbise.jar"/>
+ <echo message="Uninstalling Java EE Service Engine..."/>
+ <sleep seconds="10"/>
+ <delete file="${servicemix-autodeploy-dir}/wsdlsl.jar"/>
+ <echo message="Uninstalling SunWSDLSharedLibrary..."/>
+ <sleep seconds="10"/>
+ </target>
+
+ <target name="deploy" depends="assemble">
+ <copy file="${basedir}/service_assembly/${jbi-component-su-assembly}.zip" todir="${servicemix-autodeploy-dir}"/>
+ <sleep seconds="15"/>
+ </target>
+
+ <target name="undeploy">
+ <delete file="${servicemix-autodeploy-dir}/${jbi-component-su-assembly}.zip"/>
+ <sleep seconds="15"/>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="provider/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="runtest" depends="assemble-client">
+ <echo message="Running SOAP Binding client"/>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..248aad8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/client/SOAPWebConsumer.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:8080/provider/webservice/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/sm/bc_consumer_se_provider";
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer();
+ stat.printSummary(testId );
+ }
+
+ private void addUsingSOAPConsumer() {
+ com.example.calculator.Calculator port= null;
+ try {
+
+ System.out.println(" After creating CalculatorService");
+
+ port = service.getCalculatorPort();
+ System.out.println(" After getting port");
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:8192/calculatorendpoint/";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+ System.out.println(" After setting endpoint address URI");
+ System.out.println(" Using SOAP binding's consumer to add 1 + 2 = " + port.add(1,2));
+ stat.addStatus(testId, stat.PASS);
+ //System.out.println(" No Exception thrown");
+
+ } catch(Exception e) {
+ e.printStackTrace();
+ if(e instanceof javax.xml.ws.soap.SOAPFaultException)
+ stat.addStatus(testId, stat.PASS);
+ else {
+ stat.addStatus(testId, stat.FAIL);
+ System.out.println(" SOAPFaultException Not thrown");
+ }
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/Calculator.java
new file mode 100644
index 0000000..d5f7c36
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/Calculator.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.com/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/endpoint/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..287c050
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/META-INF/jbi.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <name>sample_service_assembly</name>
+ <description>sample service assembly</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>provider</name>
+ <description>provider</description>
+ </identification>
+ <target>
+ <artifacts-zip>provider_su.war</artifacts-zip>
+ <component-name>sun-javaee-engine</component-name>
+ </target>
+ </service-unit>
+ <service-unit>
+ <identification>
+ <name>consumer</name>
+ <description>consumer</description>
+ </identification>
+ <target>
+ <artifacts-zip>consumer_su.jar</artifacts-zip>
+ <component-name>servicemix-http</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/javaee-se-su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/javaee-se-su/META-INF/jbi.xml
new file mode 100755
index 0000000..930693b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/javaee-se-su/META-INF/jbi.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="false">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService.wsdl
new file mode 100644
index 0000000..aaa27ef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService.wsdl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:jbi='http://servicemix.org/wsdl/jbi/' xmlns:tns="http://example.com/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:http='http://schemas.xmlsoap.org/wsdl/http/' xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.com/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:8192/calculatorendpoint"/>
+ <jbi:endpoint role="consumer" defaultMep='in-out'/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..bd31e12
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/CalculatorService_schema1.xsd
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Calculator" xmlns:tns="http://example.com/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="add" type="tns:add"/>
+
+ <xs:element name="addResponse" type="tns:addResponse"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/META-INF/jbi.xml
new file mode 100755
index 0000000..7b48fda
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/xbean.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/xbean.xml
new file mode 100644
index 0000000..2f0ece3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider/service_assembly/service_units/soap-bc-su/xbean.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<beans xmlns:http="http://servicemix.apache.org/http/1.0"
+ xmlns:sample="http://example.com/Calculator">
+ <!-- soap="true" -->
+ <http:endpoint service="sample:CalculatorService"
+ endpoint="CalculatorPort"
+ role="consumer"
+ locationURI="http://localhost:8192/calculatorendpoint"
+ defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
+ />
+
+</beans>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/README
new file mode 100644
index 0000000..04ab46a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/README
@@ -0,0 +1,3 @@
+There are 3 tests in this directory. They test that exceptions are properly
+propagated through the JavaEE service engine to the webservice endpoints.
+Service engine acts as a provider, consumer and consumer&provider in these 3 tests.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/build.xml
new file mode 100644
index 0000000..a8360ec
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/build.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="soap-fault" default="all" basedir=".">
+
+
+ <target name="all">
+ <ant dir="se_consumerNprovider" target="all"/>
+ <ant dir="se_provider" target="all"/>
+ <ant dir="se_consumer" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/README
new file mode 100644
index 0000000..f8a75d6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/README
@@ -0,0 +1,23 @@
+The sample tests that exceptions are properly propagated through JavaEE service
+engine to the JavaEE component that requested for the webservice. Service engine
+acts as a consumer in this test.
+
+There is a Calculator web service, deployed as a servlet, with only one
+operation add which throws an exception. This webservice has it's jbi-enabled
+flag as false. Another servlet is deployed which has it's jbi-enabled flag as
+true. This servlet requests for the Calculator webservice and the call goes
+through the service engine.
+Client is a standalone java application which sends request to the servlet
+which inturn calls the calculator webservice.
+
+ant all of this sample does the following :
+
+1. compiles and deploys the web service on application server.
+
+2. compiles and deploys the servlet that requests for above web service,
+ deploys a consumer service unit on SOAP Binding
+
+2. runs the client which invokes the servlet.
+
+3. undeploy applications from app server and service assembly deployment from
+ SOAP Binding.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.properties
new file mode 100644
index 0000000..0300108
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.xml
new file mode 100644
index 0000000..65d6dc5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/build.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=false"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client/TestClient.java
new file mode 100644
index 0000000..e6aafe7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/client/TestClient.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/soapfault/se_consumer";
+
+ public boolean found1 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("Exception thrown Successfully") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/endpoint/Calculator.java
new file mode 100644
index 0000000..633ebc9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/endpoint/Calculator.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+ throw new java.lang.Exception("This is my exception");
+ //return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..3bc80b9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..8e5c4ef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault name="Exception" message="tns:Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:8080/calc-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..dc10172
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="Exception" type="ns3:Exception" xmlns:ns3="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..33974f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..d13e6eb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/webclient/client/Client.java
new file mode 100644
index 0000000..584d96c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumer/webclient/client/Client.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ printFailure(out);
+ } catch(java.lang.Exception e) {
+ e.printStackTrace();
+ if(e instanceof service.web.example.calculator.Exception_Exception) {
+ printSuccess(out);
+ }
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: SOAPFaultException not thrown");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Exception thrown Successfully");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/README
new file mode 100644
index 0000000..b128aa8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/README
@@ -0,0 +1,23 @@
+The sample tests that exceptions are properly propagated through JavaEE service
+engine both to the JavaEE component and to the standalone client that requested
+the service. Service engine acts as a consumer as well as a provider in this test.
+
+There is a Calculator web service, deployed as a servlet, with only one
+operation add which throws an exception. This webservice has it's jbi-enabled
+flag as true. Another servlet is deployed which has it's jbi-enabled flag as
+true. This servlet requests for the Calculator webservice and the call goes
+through the service engine.
+Client is a standalone java application which sends request to the servlet
+which inturn calls the calculator webservice.
+
+ant all of this sample does the following :
+
+1. compiles and deploys the web service on application server.
+
+2. compiles and deploys the servlet that requests for above web service,
+ deploys a consumer service unit on SOAP Binding
+
+2. runs the client which invokes the servlet.
+
+3. undeploy applications from app server and service assembly deployment from
+ SOAP Binding.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.properties
new file mode 100644
index 0000000..0300108
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calc-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.xml
new file mode 100644
index 0000000..9424e88
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/build.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/calc-web-client/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ <!--<antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=false"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <!--<antcall target="undeploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client/TestClient.java
new file mode 100644
index 0000000..61c6e43
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/client/TestClient.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/soapfault/se_consumerNprovider";
+
+ public boolean found1 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("Exception thrown Successfully") != -1)
+ found1 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/endpoint/Calculator.java
new file mode 100644
index 0000000..21f9f35
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/endpoint/Calculator.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.jws.Oneway;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) throws Exception {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+ throw new java.lang.Exception("This is my exception...");
+ //return k;
+ }
+/*
+ @WebMethod(operationName="subtract", action="urn:Subtract")
+ @Oneway
+ public void subtract(int i, int j) {
+ int k = i -j ;
+ System.out.println(i + "-" + j +" = " + k);
+ if(i == 101)
+ throw new RuntimeException("This is my exception in subtract ...");
+ }
+*/
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..3bc80b9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>client_consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..8e5c4ef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://example.web.service/Calculator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://example.web.service/Calculator" name="CalculatorService">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.web.service/Calculator" schemaLocation="CalculatorService_schema1.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </xsd:schema>
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"/>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ <fault name="Exception" message="tns:Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="add">
+ <soap:operation soapAction="urn:Add"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:8080/calc-web-client/webservice/CalculatorService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..dc10172
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.web.service/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="add" type="ns1:add" xmlns:ns1="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="addResponse" type="ns2:addResponse" xmlns:ns2="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="Exception" type="ns3:Exception" xmlns:ns3="http://example.web.service/Calculator"/>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..33974f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:CalculatorServiceInterface"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <artifacts xmlns="" role="provider" file-name="endpoints.xml" type="xml"/>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..d13e6eb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="outbound" endPoint="CalculatorPort" service="{http://example.web.service/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/webclient/client/Client.java
new file mode 100644
index 0000000..06a8194
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_consumerNprovider/webclient/client/Client.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ PrintWriter out=null;
+ try {
+ System.out.println(" Service is :" + service);
+ resp.setContentType("text/html");
+ out = resp.getWriter();
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ printFailure(out);
+ } catch(java.lang.Exception e) {
+ e.printStackTrace();
+ printSuccess(out);
+ } finally {
+ if(out != null) {
+ out.flush();
+ out.close();
+ }
+ }
+ }
+
+ public void printFailure(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Test FAILED: SOAPFaultException not thrown");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+
+ public void printSuccess(PrintWriter out) {
+ if(out == null) return;
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("Exception thrown Successfully");
+ out.println("</p>");
+ out.println("</body>");
+ out.println("</html>");
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/README
new file mode 100644
index 0000000..d707b4d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/README
@@ -0,0 +1,17 @@
+The sample tests that exceptions are properly propagated through the JavaEE
+service engine to the webservice client. Service engine acts as a provider in
+this test.
+
+There is a Calculator web service, packaged as a servlet, with only one
+operation add which throws an exception. Client is a standalone java
+application which sends request to the webservice through SOAPBinding.
+
+ant all of this sample does the following :
+
+1. compiles and deploys the web service on application server, deploys a
+ producer service unit on SOAP Binding
+
+2. runs the client which makes a webservice request through SOAP binding.
+
+3. undeploy application from app server and service assembly deployment from
+SOAP Binding.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.properties
new file mode 100644
index 0000000..68987bd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="calculatorservice"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="jbi-component-su-assembly" value="web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.xml
new file mode 100644
index 0000000..8fe560b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="warservice" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest,undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-client">
+ <param name="test-wsdl-uri" value="${appname}/webservice/CalculatorService?WSDL"/>
+ <param name="client-src" value="client"/>
+ </antcall>
+ <antcall target="deploy-jbi-component-su"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ <antcall target="configure-webservice-management"/>
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="set"/>
+ <param name="operand.props" value="server.applications.web-module.${appname}-web.web-service-endpoint.Calculator.jbi-enabled=true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jbi-component-su"/>
+ </target>
+ <target name="runtest" depends="init-common">
+ <echo message="Running SOAP Binding client"/>
+ <antcall target="run-client">
+ <param name="client-class" value="client.SOAPWebConsumer"/>
+ </antcall>
+ </target>
+
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/client/SOAPWebConsumer.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/client/SOAPWebConsumer.java
new file mode 100755
index 0000000..0f407f6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/client/SOAPWebConsumer.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.Service;
+import javax.xml.ws.BindingProvider;
+import com.example.calculator.CalculatorService;
+import com.example.calculator.Calculator;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class SOAPWebConsumer {
+ @WebServiceRef(wsdlLocation="http://localhost:12011/calculatorendpoint/CalculatorService?WSDL")
+ static CalculatorService service;
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+ private static String testId = "jbi-serviceengine/soapfault/se_provider";
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ SOAPWebConsumer client = new SOAPWebConsumer();
+ client.addUsingSOAPConsumer();
+ stat.printSummary(testId );
+ }
+
+ private void addUsingSOAPConsumer() {
+ com.example.calculator.Calculator port= null;
+
+ port = service.getCalculatorPort();
+
+ // Get Stub
+ BindingProvider stub = (BindingProvider)port;
+ String endpointURI ="http://localhost:12011/calculatorendpoint";
+ stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ endpointURI);
+
+ String failedMsg = null;
+
+ try {
+ System.out.println("\nInvoking throwRuntimeException");
+ port.throwRuntimeException("bhavani");
+ } catch(Exception ex) {
+ System.out.println(ex);
+ if(!(ex instanceof RuntimeException) ||
+ !(ex.getMessage().equals("Calculator :: Threw Runtime Exception"))) {
+ failedMsg = "port.throwRuntimeException() did not receive RuntimeException 'Calculator :: Threw Runtime Exception'";
+ }
+ }
+
+ try {
+ System.out.println("\nInvoking throwApplicationException");
+ port.throwApplicationException("bhavani");
+ } catch(Exception ex) {
+ System.out.println(ex);
+ if(!(ex instanceof com.example.calculator.Exception_Exception)) {
+ failedMsg = "port.throwApplicationException() did not throw ApplicationException";
+ }
+ }
+
+ if(failedMsg != null) {
+ stat.addStatus(testId, stat.FAIL);
+ } else {
+ stat.addStatus(testId, stat.PASS);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/endpoint/Calculator.java
new file mode 100644
index 0000000..ced9572
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/endpoint/Calculator.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.com/Calculator"
+)
+
+public class Calculator {
+ public Calculator() {}
+
+
+ @WebMethod(operationName="throwRuntimeException", action="urn:ThrowRuntimeException")
+ public String throwRuntimeException(String name) {
+ String exceptionMsg = "Calculator :: Threw Runtime Exception";
+ System.out.println(exceptionMsg);
+ throw new RuntimeException(exceptionMsg);
+ }
+
+ @WebMethod(operationName="throwApplicationException", action="urn:ThrowApplicationException")
+ public String throwApplicationException(String name) throws Exception {
+ String exceptionMsg = "Calculator :: Threw Application Exception";
+ System.out.println(exceptionMsg);
+ throw new Exception(exceptionMsg);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
new file mode 100755
index 0000000..b4da986
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/assembly/META-INF/jbi.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the SOAP binding deployments binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi ./jbi.xsd">
+ <service-assembly>
+ <identification>
+ <!--alias>SoapBinding Deployments</alias -->
+ <name>web_calculator_consumer_assembly</name>
+ <description>This is an AU for Soap Binding deployments</description>
+ </identification>
+ <service-unit>
+ <identification>
+ <name>consumer_for_web_calculator</name>
+ <description>consumer service to the soap binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>sun-http-binding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl
new file mode 100644
index 0000000..a563fec
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService.wsdl
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2-hudson-112-M1. -->
+<definitions targetNamespace="http://example.com/Calculator" name="CalculatorService" xmlns:tns="http://example.com/Calculator" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <wsp:UsingPolicy/>
+ <wsp:Policy wsu:Id="CalculatorPortBinding_throwApplicationException_WSAT_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <ns1:ATAlwaysCapability wsp:Optional="false" xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/10/wsat"/>
+ <ns2:ATAssertion ns3:Optional="true" wsp:Optional="true" xmlns:ns3="http://schemas.xmlsoap.org/ws/2002/12/policy" xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/10/wsat"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="CalculatorPortBinding_throwRuntimeException_WSAT_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <ns4:ATAlwaysCapability wsp:Optional="false" xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/10/wsat"/>
+ <ns5:ATAssertion ns6:Optional="true" wsp:Optional="true" xmlns:ns5="http://schemas.xmlsoap.org/ws/2004/10/wsat" xmlns:ns6="http://schemas.xmlsoap.org/ws/2002/12/policy"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://example.com/Calculator" schemaLocation="CalculatorService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="throwRuntimeException">
+ <part name="parameters" element="tns:throwRuntimeException"/>
+ </message>
+ <message name="throwRuntimeExceptionResponse">
+ <part name="parameters" element="tns:throwRuntimeExceptionResponse"/>
+ </message>
+ <message name="throwApplicationException">
+ <part name="parameters" element="tns:throwApplicationException"/>
+ </message>
+ <message name="throwApplicationExceptionResponse">
+ <part name="parameters" element="tns:throwApplicationExceptionResponse"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <portType name="Calculator">
+ <operation name="throwRuntimeException">
+ <input message="tns:throwRuntimeException"/>
+ <output message="tns:throwRuntimeExceptionResponse"/>
+ </operation>
+ <operation name="throwApplicationException">
+ <input message="tns:throwApplicationException"/>
+ <output message="tns:throwApplicationExceptionResponse"/>
+ <fault message="tns:Exception" name="Exception"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorPortBinding" type="tns:Calculator">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="throwRuntimeException">
+ <wsp:PolicyReference URI="#CalculatorPortBinding_throwRuntimeException_WSAT_Policy"/>
+ <soap:operation soapAction="urn:ThrowRuntimeException"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="throwApplicationException">
+ <wsp:PolicyReference URI="#CalculatorPortBinding_throwApplicationException_WSAT_Policy"/>
+ <soap:operation soapAction="urn:ThrowApplicationException"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="Exception">
+ <soap:fault name="Exception" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="CalculatorService">
+ <port name="CalculatorPort" binding="tns:CalculatorPortBinding">
+ <soap:address location="http://localhost:12011/calculatorendpoint"/>
+ </port>
+ </service>
+</definitions>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
new file mode 100644
index 0000000..af423ad
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/CalculatorService_schema1.xsd
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<xs:schema version="1.0" targetNamespace="http://example.com/Calculator" xmlns:tns="http://example.com/Calculator" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="throwApplicationException" type="tns:throwApplicationException"/>
+
+ <xs:element name="throwApplicationExceptionResponse" type="tns:throwApplicationExceptionResponse"/>
+
+ <xs:element name="throwRuntimeException" type="tns:throwRuntimeException"/>
+
+ <xs:element name="throwRuntimeExceptionResponse" type="tns:throwRuntimeExceptionResponse"/>
+
+ <xs:complexType name="throwRuntimeException">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="throwRuntimeExceptionResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="throwApplicationException">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="throwApplicationExceptionResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml
new file mode 100755
index 0000000..2d1e7e8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/META-INF/jbi.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:javaesb="http://java.sun.com"
+ xmlns:tns="http://example.com/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:CalculatorService"
+ link-type="standard"
+ service-name="tns:CalculatorService"
+ endpoint-name="CalculatorPort"/>
+ <javaesb:artifactstype>WSDL11</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml
new file mode 100755
index 0000000..329a809
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/soap-binding-su-alaska/su/endpoints.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<portmaps>
+<portmap direction="inbound" endPoint="CalculatorPort" service="{http://example.com/Calculator}CalculatorService"/>
+</portmaps>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapfault/se_provider/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/README
new file mode 100644
index 0000000..9b0f4cb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/README
@@ -0,0 +1,34 @@
+Assumption : Two asadmin domains - domain1 with default port values and domain2 with following values are created, started and openESB product is installed on both the instances along with JMS Binding.
+
+Domain2 : Expected values for ports are as follows :
+instance port : 9080
+admin port : 9848
+jmx port : 9686
+
+This devtest includes web service server deployed on domain1 and web service client - Java EE component- servlet deployed on domain2. The servlet accesses web service deployed on domain1 through Java EE Service Engine and JMS binding components.
+
+On domain1, Java EE Service Engine acts as a service provider while JMS Binding acts as a service consumer.
+
+On domain2, Java EE Service Engine acts as a service consumer while JMS binding acts as a service provider.
+
+Only one imq broker at 7676 ie. domain1 is used for creating queues.
+Filestore /tmp/imqobjects is used for persistence.
+
+
+Instructions to run the test case :
+
+
+Execute $S1AS_HOME/bin/asadmin start-domain domain1
+
+For first time users, create second domain by executing following command
+ant create-domain2
+
+
+Install openESB on the domain just created.
+
+Execute $S1AS_HOME/bin/asadmin start-domain domain2
+
+Execute mkdir -p /tmp/imqobjects
+
+Execute ant
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/broker_passfile b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/broker_passfile
new file mode 100644
index 0000000..eda23d6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/broker_passfile
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+imq.imqcmd.password=admin
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.properties
new file mode 100644
index 0000000..ec13217
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.properties
@@ -0,0 +1,42 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value=".consumer//web.xml"/>
+<property name="sun-web.xml" value="./consumer/sun-web.xml"/>
+<property name="broker.password.file" value="./broker_passfile"/>
+<property name="domain.name" value="domain2"/>
+<property name="domain2.admin.port" value="5848"/>
+<property name="domain2.instance.port" value="9080"/>
+<property name="domain2.jmx.port" value="9686"/>
+<property name="domain2.jms.port" value="8676"/>
+<property name="domain2.orb.listener.port" value="93809"/>
+<property name="domain2.http.ssl.port" value="9181"/>
+<property name="domain2.orb.mutualauth.port" value="93810"/>
+<property name="imq.broker.port" value="7676"/>
+<property name="jms-provider-assembly" value="client_web_calculator_provider_assembly"/>
+<property name="jms-provider-su" value="client_web_calculator_provider_su"/>
+<property name="jms-provider-su-dir" value="provider/jms-binding-su"/>
+<property name="jms-consumer-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jms-consumer-su" value="client_web_calculator_consumer_su"/>
+<property name="jms-consumer-su-dir" value="consumer/jms-binding-su"/>
+<property name="QueueConnectionFactory" value="javax.jms.QueueConnectionFactory"/>
+<property name="Queue" value="javax.jms.Queue"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.xml
new file mode 100644
index 0000000..2799738
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/build.xml
@@ -0,0 +1,323 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+
+ <target name="all" depends="clean, setup-server, setup-client, deploy-provider-su, deploy-consumer-su, runtest, cleanup-client, cleanup-server"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-server" depends="assemble-web, deploy-app, start-consumer-jms-binding"/>
+
+ <target name="setup-client" depends="assemble-client,deploy-client, start-provider-jms-binding"/>
+
+ <target name="cleanup-server" depends="undeploy-app, undeploy-consumer-su,stop-consumer-jms-binding"/>
+ <target name="cleanup-client" depends="undeploy-client, undeploy-provider-su,stop-provider-jms-binding"/>
+
+
+ <target name="assemble-web" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="provider/endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="deploy-consumer-su" depends="init-common">
+ <echo message="Creating QueueConnectionFactory for JMS Binding acting as a web service consumer"/>
+ <antcall target="create-jms-connection-factory">
+ <param name="jms.cf.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="create-jms-resource">
+ <param name="domain.admin.port" value="${admin.port}"/>
+ <param name="jms.res.type" value="${QueueConnectionFactory}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="deploying JMS Binding's consumer deployment "/>
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-consumer-assembly}"/>
+ <param name="jbi-component-su" value="${jms-consumer-su}"/>
+ <param name="jbi-component-su-dir" value="${jms-consumer-su-dir}"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/CalculatorServicei?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="consumer" destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./consumer/client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./consumer/client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <echo message="Deploying the client application"/>
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--port ${domain2.admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-provider-su" depends="init-common">
+ <echo message="Creating physical destinations - queues : - provideroutgoingqueue and temporary_queue"/>
+ <antcall target="create-physical-queue">
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="create-physical-queue">
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Create QueueConnectionFactory for JMS Binding which is acting as a provider"/>
+ <antcall target="create-jms-connection-factory">
+ <param name="jms.cf.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="create-jms-resource">
+ <param name="domain.admin.port" value="${domain2.admin.port}"/>
+ <param name="jms.res.type" value="${QueueConnectionFactory}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="Create JMS resource for provideroutgoingqueue and temporary_queue"/>
+ <antcall target="create-jms-queue">
+ <param name="jms.queue.name" value="provideroutgoingqueue"/>
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="create-jms-queue">
+ <param name="jms.queue.name" value="temporary_queue"/>
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Deploy JMS Binding provider deployment"/>
+ <antcall target="deploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-provider-assembly}"/>
+ <param name="jbi-component-su" value="${jms-provider-su}"/>
+ <param name="jbi-component-su-dir" value="${jms-provider-su-dir}"/>
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${domain2.admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-web"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <echo message="Running the test client"/>
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="consumer/client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${domain2.instance.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+
+
+ <target name="undeploy-consumer-su" depends="init-common">
+ <echo message="Undeploying JMS resource : MyQueueConnectionFactory"/>
+ <antcall target="delete-appserver-jms-resource">
+ <param name="domain.admin.port" value="${admin.port}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <!--<antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="MyQueueConnectionFactory"/>
+ </antcall>-->
+ <echo message="Undeploying JMS Binding consumer deployment"/>
+ <antcall target="undeploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-consumer-assembly}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy-provider-su" depends="init-common">
+ <echo message="Undeploying JMS Resource :- provideroutgoingqueue and temporary_queue"/>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Undeploying JMS resource : MyQueueConnectionFactory"/>
+ <antcall target="delete-appserver-jms-resource">
+ <param name="domain.admin.port" value="${domain2.admin.port}"/>
+ <param name="jms.res.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <antcall target="delete-jms-resource">
+ <param name="jms.resource.name" value="MyQueueConnectionFactory"/>
+ </antcall>
+ <echo message="Deleting physical queues : provideroutgoingqueue , temporary_queue"/>
+ <antcall target="delete-physical-queue">
+ <param name="queue.name" value="provideroutgoingqueue"/>
+ </antcall>
+ <antcall target="delete-physical-queue">
+ <param name="queue.name" value="temporary_queue"/>
+ </antcall>
+ <echo message="Undeploying JMS Binding's provider deployment"/>
+ <antcall target="undeploy-jbi-component-su">
+ <param name="jbi-component-su-assembly" value="${jms-provider-assembly}"/>
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ </antcall>
+ </target>
+
+ <target name="create-domain2" depends="init-common">
+ <property name="admin.command" value="create-domain"/>
+ <property name="operand.props" value="--adminport ${domain2.admin.port} --adminuser admin --passwordfile ${admin.password.file} --instanceport ${domain2.instance.port} --savemasterpassword=true --domainproperties domain.jmxPort=${domain2.jmx.port}:jms.port=${domain2.jms.port}:orb.listner.port=${domain2.orb.listner.port}:http.ssl.port=${domain2.http.ssl.port}:orb.mutualauth.port=${domain2.orb.mutualauth.port} ${domain.name}"/>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="${admin.command} ${operand.props}" />
+ </exec>
+ </target>
+
+ <target name="start-domain2" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain --user ${admin.user} ${domain.name}"/>
+ </exec>
+ </target>
+
+ <target name="create-physical-queue" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqcmd" failonerror="false">
+ <arg line="create dst -n ${queue.name} -t q -u admin -passfile ${broker.password.file} -b localhost:${imq.broker.port}"/>
+ </exec>
+ </target>
+
+ <target name="create-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="false">
+ <arg line="create-jms-resource --user ${admin.user} --passwordfile ${admin.password.file} --port ${domain.admin.port} --restype ${jms.res.type} ${jms.res.name}"/>
+ </exec>
+ </target>
+ <target name="create-jms-queue" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="false">
+ <arg line="add -l "${jms.queue.name}" -t q -o "imqDestinationName=${queue.name}" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+
+ <target name="create-jms-connection-factory" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="true">
+ <arg line="add -f -l "${jms.cf.name}" -t qf -o "imqAddressList=mq://localhost:${imq.broker.port}/jms" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+
+ <target name="delete-physical-queue" depends="init-common" >
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqcmd" failonerror="false">
+ <arg line="destroy dst -f -n ${queue.name} -t q -passfile ${broker.password.file} -u admin -b localhost:${imq.broker.port}" />
+ </exec>
+ </target>
+
+ <target name="delete-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/imq/bin/imqobjmgr" failonerror="false">
+ <arg line="delete -f -l "${jms.resource.name}" -j "java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory" -j "java.naming.provider.url=file:/tmp/imqobjects""/>
+ </exec>
+ </target>
+ <target name="delete-appserver-jms-resource" depends="init-common">
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="false">
+ <arg line="delete-jms-resource --user ${admin.user} --passwordfile ${admin.password.file} --port ${domain.admin.port} ${jms.res.name}"/>
+ </exec>
+ </target>
+
+ <target name="delete-domain2" depends="init-common">
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="delete-domain domain2 " />
+ </exec>
+ </target>
+ <target name="stop-provider-jms-binding" depends="init-common">
+ <antcall target="stop-binding">
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="start-provider-jms-binding" depends="init-common">
+ <antcall target="start-binding">
+ <param name="jmx.port" value="${domain2.jmx.port}"/>
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="stop-consumer-jms-binding" depends="init-common">
+ <antcall target="stop-binding">
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+ <target name="start-consumer-jms-binding" depends="init-common">
+ <antcall target="start-binding">
+ <param name="jbi.component.name" value="SunJMSBinding"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-sun-web.xml
new file mode 100644
index 0000000..cbefb3b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-sun-web.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <wsdl-override>http://localhost:8080/jsr208-integration-web-client/CalculatorService?WSDL</wsdl-override>
+ <port-info>
+ <wsdl-port><namespaceURI>http://example.web.service/Calculator</namespaceURI> <localpart>CalculatorPort</localpart></wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client/TestClient.java
new file mode 100644
index 0000000..466e35c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/soapoverjms/consumer";
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[3]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/assembly/META-INF/jbi.xml
new file mode 100644
index 0000000..918a957
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the JMS binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service-assembly>
+ <identification>
+ <name>client_web_calculator_consumer_assembly</name>
+ <description>This is an SA for JMS Binding</description>
+ </identification>
+
+ <service-unit>
+ <identification>
+ <name>client_web_calculator_consumer_su</name>
+ <description>This is an SU that is deployed to the jms binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_consumer_su.jar</artifacts-zip>
+ <component-name>SunJMSBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/META-INF/jbi.xml
new file mode 100644
index 0000000..5c66b9e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaesb="Schema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <consumes interface-name="tns:transformIF"
+ service-name="tns:CalculatorService"
+ endpoint-name="Calculator"/>
+<javaesb:artifactstype>WSDL20</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/endpoints.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/endpoints.wsdl
new file mode 100644
index 0000000..52279a7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/jms-binding-su/su/endpoints.wsdl
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions xmlns="http://www.w3.org/2004/08/wsdl" xmlns:tns="http://example.web.service/Calculator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2004/08/wsdl file:///E:/javatools/xmlschemaeditor/examples/filebinding/wsdl20sug8.xsd" xmlns:jms="http://sun.com/jbi/wsdl/jms10" xmlns:tout="http://sun.com/transformationout.xsd" xmlns:tin="http://sun.com/transformation.xsd" targetNamespace="http://example.web.service/Calculator">
+ <xs:types xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2003/XMLSchema-instance">
+ <schema targetNamespace="http://sun.com/transformation.xsd" xmlns:ns="http://sun.com/transformation.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="transform">
+ <sequence>
+ <element name="catalog" maxOccurs="1" type="tin:catalogType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="catalogType">
+ <sequence>
+ <element name="cd" maxOccurs="10" type="tin:cdType"/>
+ </sequence>
+ </complexType>
+ <complexType name="cdType">
+ <sequence>
+ <element name="title" type="string"/>
+ <element name="artist" type="string"/>
+ <element name="country" type="string"/>
+ <element name="company" type="string"/>
+ <element name="price" type="string"/>
+ <element name="year" type="string"/>
+ </sequence>
+ </complexType>
+ </schema>
+ <schema targetNamespace="http://sun.com/transformationout.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="htmlOuput">
+ <sequence>
+ <element name="html" maxOccurs="1" type="tout:htmlType"/>
+ </sequence>
+ </complexType>
+ <complexType name="htmlType">
+ <sequence>
+ <element name="body" type="tout:bodyType"/>
+ </sequence>
+ </complexType>
+ <complexType name="bodyType">
+ <sequence>
+ <element name="h2" type="tout:h2Type"/>
+ <element name="table" type="tout:tableType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="h2Type" type="xs:string"/>
+ <complexType name="tableType">
+ <sequence>
+ <element name="tr" type="tyType"/>
+ </sequence>
+ <attribute name="border" use="required" type="xs:integer"/>
+ </complexType>
+
+ <complexType name="trType">
+ <complexType>
+ <choice>
+ <element name="td" type="tdType"/>
+ <element name="th" type="thType"/>
+ </choice>
+ <attribute name="bgcolor"/>
+ </complexType>
+ </complexType>
+ <complexType name="tdType" type="xs:string"/>
+ <complexType name="thType">
+ <complexType>
+ <simpleContent>
+ <extension base="xs:NCName">
+ <attribute name="align" use="required" type="xs:NCName"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ </complexType>
+ </schema>
+ </xs:types>
+ <interface name="transformIF">
+ <operation name="add" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/in-out">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ <operation name="getMessageInOnly" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/in-only">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ <operation name="getMessageRobustInOnly" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/robust-in-only">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ </interface>
+ <binding name="jmsbinding" interface="tns:transformIF" type="http://sun.com/jbi/wsdl/jms10">
+ <!-- if the ref is not qualified by the tns then it takes the xmlns by default -->
+ <operation ref="add" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ <operation ref="getMessageInOnly" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ <operation ref="getMessageRobustInOnly" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ </binding>
+ <binding name="somebingin" interface="tns:transformIF" type="http://sun.com/jbi/wsdl/file10">
+ <operation ref="getMessage" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService" interface="tns:transformIF">
+ <documentation>
+ Transforms the input xml document to another xml format using the deployed stylesheet for this service
+ </documentation>
+ <endpoint name="Calculator" binding="tns:jmsbinding"
+ jms:destination-name="provideroutgoingqueue"
+ jms:endpoint-role="Consumer"
+ jms:destination-style="Queue"
+ jms:connection-factory-name="MyQueueConnectionFactory"
+ jms:connection-user-name="guest"
+ jms:connection-password="guest"
+ jms:message-selector=""
+ jms:time-to-live="5000" jms:reply-to="" >
+ </endpoint>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/web.xml
new file mode 100644
index 0000000..676de20
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>CalculatorPort</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CalculatorPort</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/webclient/client/Client.java
new file mode 100644
index 0000000..2494f87
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/consumer/webclient/client/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ try {
+ System.out.println(" Service is :" + service);
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Calculator add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/endpoint/Calculator.java
new file mode 100644
index 0000000..7553337
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/endpoint/Calculator.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/assembly/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/assembly/META-INF/jbi.xml
new file mode 100644
index 0000000..df81455
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/assembly/META-INF/jbi.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- jbi.xml file for the JMS binding. -->
+<jbi
+ version="1.0"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service-assembly>
+ <identification>
+ <name>client_web_calculator_provider_assembly</name>
+ <description>This is an SA for JMS Binding</description>
+ </identification>
+
+ <service-unit>
+ <identification>
+ <name>client_web_calculator_provider_su</name>
+ <description>This is an SU that is deployed to the jms binding</description>
+ </identification>
+ <target>
+ <artifacts-zip>client_web_calculator_provider_su.jar</artifacts-zip>
+ <component-name>SunJMSBinding</component-name>
+ </target>
+ </service-unit>
+ </service-assembly>
+</jbi>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/META-INF/jbi.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/META-INF/jbi.xml
new file mode 100644
index 0000000..8f38d07
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/META-INF/jbi.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' ?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<jbi version="1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaesb="XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/jbi"
+ xmlns:tns="http://example.web.service/Calculator"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jbi jbi.xsd">
+ <services binding-component="true">
+ <provides interface-name="tns:transformIF"
+ service-name="tns:CalculatorService"
+ endpoint-name="Calculator"/>
+<javaesb:artifactstype>WSDL20</javaesb:artifactstype>
+ </services>
+</jbi>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/endpoints.wsdl b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/endpoints.wsdl
new file mode 100644
index 0000000..8ddeae9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/soapoverjms/provider/jms-binding-su/su/endpoints.wsdl
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions xmlns="http://www.w3.org/2004/08/wsdl" xmlns:tns="http://example.web.service/Calculator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2004/08/wsdl file:///E:/javatools/xmlschemaeditor/examples/filebinding/wsdl20sug8.xsd" xmlns:jms="http://sun.com/jbi/wsdl/jms10" xmlns:tout="http://sun.com/transformationout.xsd" xmlns:tin="http://sun.com/transformation.xsd" targetNamespace="http://example.web.service/Calculator">
+ <xs:types xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2003/XMLSchema-instance">
+ <schema targetNamespace="http://sun.com/transformation.xsd" xmlns:ns="http://sun.com/transformation.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="transform">
+ <sequence>
+ <element name="catalog" maxOccurs="1" type="tin:catalogType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="catalogType">
+ <sequence>
+ <element name="cd" maxOccurs="10" type="tin:cdType"/>
+ </sequence>
+ </complexType>
+ <complexType name="cdType">
+ <sequence>
+ <element name="title" type="string"/>
+ <element name="artist" type="string"/>
+ <element name="country" type="string"/>
+ <element name="company" type="string"/>
+ <element name="price" type="string"/>
+ <element name="year" type="string"/>
+ </sequence>
+ </complexType>
+ </schema>
+ <schema targetNamespace="http://sun.com/transformationout.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="htmlOuput">
+ <sequence>
+ <element name="html" maxOccurs="1" type="tout:htmlType"/>
+ </sequence>
+ </complexType>
+ <complexType name="htmlType">
+ <sequence>
+ <element name="body" type="tout:bodyType"/>
+ </sequence>
+ </complexType>
+ <complexType name="bodyType">
+ <sequence>
+ <element name="h2" type="tout:h2Type"/>
+ <element name="table" type="tout:tableType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="h2Type" type="xs:string"/>
+ <complexType name="tableType">
+ <sequence>
+ <element name="tr" type="tyType"/>
+ </sequence>
+ <attribute name="border" use="required" type="xs:integer"/>
+ </complexType>
+
+ <complexType name="trType">
+ <complexType>
+ <choice>
+ <element name="td" type="tdType"/>
+ <element name="th" type="thType"/>
+ </choice>
+ <attribute name="bgcolor"/>
+ </complexType>
+ </complexType>
+ <complexType name="tdType" type="xs:string"/>
+ <complexType name="thType">
+ <complexType>
+ <simpleContent>
+ <extension base="xs:NCName">
+ <attribute name="align" use="required" type="xs:NCName"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ </complexType>
+ </schema>
+ </xs:types>
+ <interface name="transformIF">
+ <operation name="add" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/in-out">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ <operation name="getMessageInOnly" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/in-only">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ <operation name="getMessageRobustInOnly" style="http://www.w3.org/2004/08/wsdl/style/rpc" pattern="http://www.w3.org/2004/08/wsdl/robust-in-only">
+ <input messageLabel="A" element="tin:transform"/>
+ <output messageLabel="B" element="tout:htmlOuput"/>
+ </operation>
+ </interface>
+ <binding name="jmsbinding" interface="tns:transformIF" type="http://sun.com/jbi/wsdl/jms10">
+ <!-- if the ref is not qualified by the tns then it takes the xmlns by default -->
+ <operation ref="add" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ <operation ref="getMessageInOnly" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ <operation ref="getMessageRobustInOnly" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ </binding>
+ <binding name="somebingin" interface="tns:transformIF" type="http://sun.com/jbi/wsdl/file10">
+ <operation ref="getMessage" jms:input-message-type="TextMessage" jms:output-message-type="TextMessage">
+ <input messageLabel="A">
+ </input>
+ <output messageLabel="B">
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorService" interface="tns:transformIF">
+ <documentation>
+ Transforms the input xml document to another xml format using the deployed stylesheet for this service
+ </documentation>
+ <endpoint name="Calculator" binding="tns:jmsbinding"
+ jms:destination-name="provideroutgoingqueue"
+ jms:endpoint-role="Provider"
+ jms:destination-style="Queue"
+ jms:connection-factory-name="MyQueueConnectionFactory"
+ jms:connection-user-name="guest"
+ jms:connection-password="guest"
+ jms:message-selector=""
+ jms:time-to-live="5000" jms:reply-to="" >
+ </endpoint>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/README
new file mode 100644
index 0000000..414aa54
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/README
@@ -0,0 +1,10 @@
+This directory contains tests to check the transaction feature in JavaEE service engine.
+
+These tests require database to be up and running.
+Every test here creates a different table and drops that table in the end of the execution.
+
+Tests jse_only* have JavaEE SE as consumer as well as provider. No binding component is used in these tests.
+
+How to Run:
+1. Start appserver and start database.
+2. asant all
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/build.xml
new file mode 100644
index 0000000..39893cf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/build.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+]>
+
+<project name="javaee_transactions" default="all" basedir=".">
+
+ <target name="all">
+ <ant dir="jse_only" target="all"/>
+ <ant dir="jse_only_ejbcommit" target="all"/>
+ <ant dir="jse_only_ejbcommit1" target="all"/>
+ <ant dir="jse_only_ejbrollback" target="all"/>
+ <ant dir="jse_only_ejbrollback1" target="all"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/README
new file mode 100644
index 0000000..3c0e30a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/README
@@ -0,0 +1 @@
+This is a simple test that executes a calculator webservice. Nothing related to transaction is done here. This ensures that the normal path works fine.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.properties
new file mode 100644
index 0000000..3f83010
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.properties
@@ -0,0 +1,27 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration-web-client"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
+<property name="jbi-component-su-assembly" value="client_web_calculator_consumer_assembly"/>
+<property name="jbi-component-su" value="client_web_calculator_consumer_su"/>
+<property name="jbi-component-su-dir" value="soap-binding-su-alaska"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.xml
new file mode 100644
index 0000000..dba069b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/build.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app,assemble-client,deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+ <antcall target="pkg-war">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService?WSDL" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/jsr208-integration-web-client/webservice/CalculatorService?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ <!--<antcall target="undeploy-jbi-component-su"/>-->
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-web"/>
+ <param name="wsName" value="Calculator"/>
+ <param name="module" value="web-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-sun-web.xml
new file mode 100644
index 0000000..0d054a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-sun-web.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+<service-ref>
+ <service-ref-name>sun-web.serviceref/calculator</service-ref-name>
+ <port-info>
+<wsdl-port>
+ <namespaceURI>http://example.web.service/Calculator</namespaceURI>
+ <localpart>CalculatorPort</localpart>
+</wsdl-port>
+<service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface>
+ <stub-property name="jbi-enabled" value="true"/>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-web.xml
new file mode 100644
index 0000000..eeb730d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client-web.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client/TestClient.java
new file mode 100644
index 0000000..5e865d0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/client/TestClient.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/transactions/jse_only";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF Calculator add SERVICE IS") != -1)
+ found1 = true;
+ if(line.indexOf("[3]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/endpoint/Calculator.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/endpoint/Calculator.java
new file mode 100644
index 0000000..dc2f930
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/endpoint/Calculator.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+@WebService(
+ name="Calculator",
+ serviceName="CalculatorService",
+ targetNamespace="http://example.web.service/Calculator"
+)
+public class Calculator {
+ public Calculator() {}
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
+ @WebMethod(operationName="add", action="urn:Add")
+ public int add(int i, int j) {
+ int k = i +j ;
+ System.out.println(i + "+" + j +" = " + k);
+
+ return k;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/webclient/client/Client.java
new file mode 100644
index 0000000..2efc31c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only/webclient/client/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.xml.ws.*;
+import service.web.example.calculator.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/calculator") CalculatorService service;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ UserTransaction ut = null;
+ try {
+ ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
+ ut.begin();
+
+ System.out.println(" Service is :" + service);
+ Calculator port = service.getCalculatorPort();
+ int ret = port.add(1, 2);
+ ut.commit();
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF Calculator add SERVICE IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ out.flush();
+ out.close();
+ } catch(Exception e) {
+ try {
+ if(ut != null)
+ ut.rollback();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/README
new file mode 100644
index 0000000..46a300d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/README
@@ -0,0 +1,12 @@
+This tests the commit logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. It adds a row in the database table(CUSTOMER_cm) created in the servlet.
+
+Here is the flow-
+
+1. Standalone client invokes a servlet
+2. Servlet creates table CUSTOMER_cm
+3. Servlet starts a UserTransaction
+4. Servlet calls the EJB webservice
+5. EJB webservice adds a row in the CUSTOMER_cm table
+6. Servlet commits the transaction
+7. It is checked whether the data is correctly updated in the table.
+8. Table CUSTOMER_cm is dropped
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.properties
new file mode 100644
index 0000000..0331624
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.xml
new file mode 100644
index 0000000..c169d21
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/build.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-ejb"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-app"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-sun-web.xml
new file mode 100644
index 0000000..d43e70f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-sun-web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-web.xml
new file mode 100644
index 0000000..5ac2649
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client-web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client/TestClient.java
new file mode 100644
index 0000000..93df6bf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/client/TestClient.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/transactions/jse_only_ejbcommit";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EJB webservice IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..6f259d7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+import javax.ejb.SessionContext;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.annotation.Resource;
+import java.sql.*;
+import javax.sql.DataSource;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource private SessionContext ctx;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRED)
+ public String sayHello(String who) {
+ System.out.println("**** EJB Called");
+ Connection con=null;
+ String tableName = "CUSTOMER_cm";
+ try {
+ con = ds.getConnection();
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+
+ updateTable(con, tableName, "Vikas", "vikas@sun.com");
+ readData(con, tableName);
+ } catch(Exception ex) {
+ throw new RuntimeException(ex);
+ } finally {
+ try {
+ if(con != null) con.close();
+ } catch (SQLException se) {}
+ }
+ //ctx.setRollbackOnly();
+ return "WebSvcTest-Hello " + who;
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+
+ private void readData(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()){
+ System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2));
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/webclient/client/Client.java
new file mode 100644
index 0000000..42ad08d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit/webclient/client/Client.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.annotation.Resource;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import javax.transaction.Status;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.*;
+import javax.sql.DataSource;
+
+import javax.xml.ws.*;
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ UserTransaction ut = null;
+ // Create Table with name CUSTOMER_cm. This name will be used in the EJB
+ String tableName = "CUSTOMER_cm";
+ String nameEntry = "Vikas";
+ String emailEntry= "vikas@sun.com";
+ try {
+ Connection con = ds.getConnection();
+ // autocommit is made true so that the table is created and dropped immediately
+ con.setAutoCommit(true);
+ createTable(con, tableName);
+ ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
+ ut.begin();
+
+ System.out.println(" Service is :" + service);
+ Hello port = service.getHelloEJBPort();
+
+ String ret = port.sayHello("Appserver Tester !");
+ System.out.println("Return value from webservice:"+ret);
+
+ if(ut.getStatus() != Status.STATUS_ACTIVE) {
+ ret += "FAILED";
+ } else {
+ System.out.println("**** committing transaction");
+ ut.commit();
+ if(!isDataUpdated(con, tableName, nameEntry, emailEntry)) {
+ ret += "FAILED";
+ }
+ }
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EJB webservice IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ dropTable(con, tableName);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // use this table in the EJB webservice
+ private void createTable(Connection con, String tableName) throws Exception {
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+ PreparedStatement pStmt =
+ con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))");
+ pStmt.executeUpdate();
+ }
+
+ private void dropTable(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName);
+ pStmt.executeUpdate();
+ }
+
+ // Check whether the EJB webservice has updated the data in the table.
+ private boolean isDataUpdated(Connection con, String tableName, String name, String email) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ try {
+ while(rs.next()) {
+ String db_Name = rs.getString(1);
+ String db_Email = rs.getString(2);
+ System.out.println("NAME="+db_Name+", EMAIL="+db_Email);
+ if(db_Name.equals(name) && db_Email.equals(email))
+ return true;
+ }
+ } finally {
+ rs.close();
+ }
+ return false;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/README
new file mode 100644
index 0000000..d4ba329
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/README
@@ -0,0 +1,13 @@
+This tests the commit logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute. It adds a row in the database table(CUSTOMER_cm1) created in the servlet.
+
+Here is the flow-
+
+1. Standalone client invokes a servlet
+2. Servlet creates table CUSTOMER_cm1
+3. Servlet starts a UserTransaction
+4. Servlet adds a row in the CUSTOMER_cm1 table
+5. Servlet calls the EJB webservice
+6. EJB webservice adds a row in the CUSTOMER_cm1 table
+7. Servlet commits the transaction
+8. It is checked whether the data is correctly updated in the table.
+9. Table CUSTOMER_cm1 is dropped
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.properties
new file mode 100644
index 0000000..0331624
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.xml
new file mode 100644
index 0000000..c169d21
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/build.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-ejb"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-app"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-sun-web.xml
new file mode 100644
index 0000000..d43e70f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-sun-web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-web.xml
new file mode 100644
index 0000000..5ac2649
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client-web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client/TestClient.java
new file mode 100644
index 0000000..89353c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/client/TestClient.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/transactions/jse_only_ejbcommit1";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EJB webservice IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..58a8593
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+import javax.ejb.SessionContext;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.annotation.Resource;
+import java.sql.*;
+import javax.sql.DataSource;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource private SessionContext ctx;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRED)
+ public String sayHello(String who) {
+ System.out.println("**** EJB Called");
+ Connection con=null;
+ String tableName = "CUSTOMER_cm1";
+ String nameEntry = "Vikas";
+ String emailEntry= "vikas@sun.com";
+
+ try {
+ con = ds.getConnection();
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+
+ updateTable(con, tableName, nameEntry, emailEntry);
+ readData(con, tableName);
+ } catch(Exception ex) {
+ throw new RuntimeException(ex);
+ } finally {
+ try {
+ if(con != null) con.close();
+ } catch (SQLException se) {}
+ }
+ //ctx.setRollbackOnly();
+ return "WebSvcTest-Hello " + who;
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+
+ private void readData(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()){
+ System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2));
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/webclient/client/Client.java
new file mode 100644
index 0000000..61cb8d4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbcommit1/webclient/client/Client.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.annotation.Resource;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import javax.transaction.Status;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.*;
+import javax.sql.DataSource;
+
+import javax.xml.ws.*;
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ UserTransaction ut = null;
+ // Create Table with name CUSTOMER_cm1. This name will be used in the EJB
+ String tableName = "CUSTOMER_cm1";
+ String[] names = {"Vikas", "VikasAwasthi"};
+ String[] emails= {"vikas@sun.com", "VikasA@sun.com"};
+ try {
+ Connection con = ds.getConnection();
+ createTable(con, tableName);
+ ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
+ ut.begin();
+
+ updateTable(con, tableName, names[1], emails[1]);
+ System.out.println(" Service is :" + service);
+ Hello port = service.getHelloEJBPort();
+
+ String ret = port.sayHello("Appserver Tester !");
+ System.out.println("Return value from webservice:"+ret);
+
+ if(ut.getStatus() != Status.STATUS_ACTIVE) {
+ ret += "FAILED";
+ } else {
+ System.out.println("**** committing transaction");
+ ut.commit();
+ if(!isDataUpdated(con, tableName, names, emails)) {
+ ret += "FAILED";
+ }
+ }
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EJB webservice IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ dropTable(con, tableName);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // use this table in the EJB webservice
+ private void createTable(Connection con, String tableName) throws Exception {
+ // autocommit is made true so that the table is created immediately
+ boolean autoCommit = con.getAutoCommit();
+ con.setAutoCommit(true);
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+ PreparedStatement pStmt =
+ con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))");
+ pStmt.executeUpdate();
+ con.setAutoCommit(autoCommit);
+ }
+
+ private void dropTable(Connection con, String tableName) throws Exception {
+ boolean autoCommit = con.getAutoCommit();
+ con.setAutoCommit(true);
+ PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName);
+ pStmt.executeUpdate();
+ con.setAutoCommit(autoCommit);
+ }
+
+ // Check whether the EJB webservice has updated the data in the table.
+ private boolean isDataUpdated(Connection con, String tableName, String[] names, String[] emails) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ int allDataCount = 0;
+ while(rs.next()) {
+ String db_Name = rs.getString(1);
+ String db_Email = rs.getString(2);
+ System.out.println("NAME="+db_Name+", EMAIL="+db_Email);
+ for (int i=0; i < names.length; i++)
+ if(db_Name.equals(names[i]) && db_Email.equals(emails[i]))
+ allDataCount++;
+ }
+ rs.close();
+ return (allDataCount == names.length);
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email)
+ throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/README
new file mode 100644
index 0000000..20e70e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/README
@@ -0,0 +1,14 @@
+This tests the rollback logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute.
+
+Here is the flow-
+
+1. Standalone client invokes a servlet
+2. Servlet creates table CUSTOMER_rb1
+3. Servlet starts a UserTransaction
+4. Servlet adds a row in the CUSTOMER_rb1 table
+5. Servlet calls the EJB webservice
+6. EJB webservice adds a row in the CUSTOMER_rb1 table
+7. Transaction is rolledback using SessionContext.setRollbackOnly()
+8. Servlet rollback the transaction
+9. It is checked that the data is not updated in the table.
+10. Table CUSTOMER_rb1 is dropped
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.properties
new file mode 100644
index 0000000..0331624
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.xml
new file mode 100644
index 0000000..c169d21
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/build.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-ejb"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-app"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-sun-web.xml
new file mode 100644
index 0000000..d43e70f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-sun-web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-web.xml
new file mode 100644
index 0000000..5ac2649
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client-web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client/TestClient.java
new file mode 100644
index 0000000..1d33eab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/client/TestClient.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/transactions/jse_only_ejbrollback";
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EJB webservice IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..9e11297
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+import javax.ejb.SessionContext;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.annotation.Resource;
+import java.sql.*;
+import javax.sql.DataSource;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource private SessionContext ctx;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRED)
+ public String sayHello(String who) {
+ System.out.println("**** EJB Called");
+ Connection con=null;
+ String tableName = "CUSTOMER_rb";
+ try {
+ con = ds.getConnection();
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+
+ updateTable(con, tableName, "Vikas", "vikas@sun.com");
+ readData(con, tableName);
+ } catch(Exception ex) {
+ throw new RuntimeException(ex);
+ } finally {
+ try {
+ if(con != null) con.close();
+ } catch (SQLException se) {}
+ }
+ ctx.setRollbackOnly();
+ return "WebSvcTest-Hello " + who;
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+
+ private void readData(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()){
+ System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2));
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/webclient/client/Client.java
new file mode 100644
index 0000000..9bd8543
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback/webclient/client/Client.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.annotation.Resource;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import javax.transaction.Status;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.*;
+import javax.sql.DataSource;
+
+import javax.xml.ws.*;
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ UserTransaction ut = null;
+ // Create Table with name CUSTOMER_rb. This name will be used in the EJB
+ String tableName = "CUSTOMER_rb";
+ try {
+ Connection con = ds.getConnection();
+ con.setAutoCommit(true);
+ createTable(con, tableName);
+ ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
+ ut.begin();
+
+ System.out.println(" Service is :" + service);
+ Hello port = service.getHelloEJBPort();
+
+ String ret = port.sayHello("Appserver Tester !");
+ System.out.println("Return value from webservice:"+ret);
+
+ if(ut.getStatus() != Status.STATUS_MARKED_ROLLBACK) {
+ ret += "FAILED";
+ }
+ System.out.println("**** rollbacking transaction");
+ ut.rollback();
+ if(isDataPresent(con, tableName)) {
+ ret += "FAILED";
+ }
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EJB webservice IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ dropTable(con, tableName);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // use this table in the EJB webservice
+ private void createTable(Connection con, String tableName) throws Exception {
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+ PreparedStatement pStmt =
+ con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))");
+ pStmt.executeUpdate();
+ }
+
+ private void dropTable(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName);
+ pStmt.executeUpdate();
+ }
+
+ // Check whether the EJB webservice has updated the data in the table.
+ private boolean isDataPresent(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()) {
+ String db_Name = rs.getString(1);
+ String db_Email = rs.getString(2);
+ System.out.println("NAME="+db_Name+", EMAIL="+db_Email);
+ rs.close();
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/README b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/README
new file mode 100644
index 0000000..f227946
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/README
@@ -0,0 +1,13 @@
+This tests the rollback logic of transaction. An EJB webservice is invoked by a servlet. This webservice method uses REQUIRED TX_Attribute.
+
+Here is the flow-
+
+1. Standalone client invokes a servlet
+2. Servlet creates table CUSTOMER_rb1
+3. Servlet starts a UserTransaction
+4. Servlet adds a row in the CUSTOMER_rb1 table
+5. Servlet calls the EJB webservice
+6. EJB webservice adds a row in the CUSTOMER_rb1 table
+7. Servlet rollback the transaction
+8. It is checked that the data is not updated in the table.
+9. Table CUSTOMER_rb1 is dropped
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.properties b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.properties
new file mode 100644
index 0000000..0331624
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="jsr208-integration"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="sun-web.xml" value="./sun-web.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.xml
new file mode 100644
index 0000000..c169d21
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/build.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../../annotations/jaxwstools.xml">
+<!ENTITY jbicommon SYSTEM "file:./../../jbi_commons.xml">
+<!ENTITY jbiproperties SYSTEM "file:./../../jbi_commons.properties">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="web-client" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+ &jaxwsTools;
+ &jbicommon;
+ &jbiproperties;
+ <target name="all" depends="clean, setup, runtest, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-ejb, deploy-app, assemble-client, deploy-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile">
+ <echo message="Assembling web service module"/>
+ <mkdir dir="${assemble.dir}"/>
+ <jar destfile="${assemble.dir}/${appname}-ejb.jar"
+ basedir="${build.classes.dir}"
+ includes="endpoint/**">
+ </jar>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <echo message="Assembling web client"/>
+ <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
+ <mkdir dir="${assemble.dir}"/>
+ <echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/HelloEJBService/HelloEJB?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ debug="on"
+ includes="webclient/**"/>
+ <copy file="./client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
+ <copy file="./client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
+ <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
+ </target>
+
+ <target name="deploy-client" depends="assemble-client">
+ <property name="client.war" value="${assemble.dir}/wsclient.war"/>
+ <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
+ <exec executable="${ASADMIN}">
+ <arg line="deploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${client.war}"/>
+ </exec>
+ </target>
+
+ <target name="deploy-app">
+ <echo message="Deploying the web service"/>
+ <antcall target="deploy-jar-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+
+ <antcall target="set-jbi-enabled">
+ <param name="appName" value="${appname}-ejb"/>
+ <param name="wsName" value="HelloEJB"/>
+ <param name="module" value="ejb-module"/>
+ <param name="flag" value="true"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-app"/>
+ <antcall target="undeploy-client"/>
+ </target>
+
+ <target name="undeploy-client" depends="init-common">
+ <echo message="Undeploying client application"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="wsclient"/>
+ </exec>
+ </target>
+
+ <target name="undeploy-app" depends="init-common">
+ <echo message="Undeploying web service"/>
+ <exec executable="${ASADMIN}">
+ <arg line="undeploy"/>
+ <arg line="--user ${admin.user}"/>
+ <arg line="--passwordfile ${admin.password.file}"/>
+ <arg line="--host ${admin.host}"/>
+ <arg line="--port ${admin.port}"/>
+ <arg line="${appname}-ejb"/>
+ </exec>
+ </target>
+
+ <target name="runtest" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar"
+ includes="client/**"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
+ <java classname="client.TestClient">
+ <classpath>
+ <pathelement path="${build.classes.dir}/client"/>
+ </classpath>
+ <arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
+ </java>
+ </target>
+ <target name="configure-webservice-management" depends="init-common">
+ <antcall target="asadmin-common">
+ <param name="admin.command" value="configure-webservice-management"/>
+ <param name="operand.props" value="${appname}-web#Calculator"/>
+ </antcall>
+ </target>
+
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-sun-web.xml
new file mode 100644
index 0000000..d43e70f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-sun-web.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+ <service-ref>
+ <service-ref-name>sun-web.serviceref/HelloEJBService</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ <wsdl-port>
+ <namespaceURI>http://endpoint/ejb</namespaceURI>
+ <localpart>HelloEJBPort</localpart>
+ </wsdl-port>
+ <stub-property>
+ <name>jbi-enabled</name>
+ <value>true</value>
+ </stub-property>
+ </port-info>
+ <wsdl-override>http://localhost:8080/HelloEJBService/HelloEJB?WSDL</wsdl-override>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-web.xml
new file mode 100644
index 0000000..5ac2649
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client-web.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <description>A test application</description>
+ <display-name>WebTier</display-name>
+ <servlet>
+ <display-name>centralServlet</display-name>
+ <servlet-name>RequestProcessor</servlet-name>
+ <servlet-class>client.Client</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RequestProcessor</servlet-name>
+ <url-pattern>/webclient/RequestProcessor</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/helloservice</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <port-component-ref>
+ <service-endpoint-interface>endpoint.ejb.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client/TestClient.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client/TestClient.java
new file mode 100644
index 0000000..293b817
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/client/TestClient.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class TestClient {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ private static String testId = "jbi-serviceengine/transactions/jse_only_ejbrollback1";
+
+ public boolean found1 = false;
+ public boolean found2 = false;
+
+ public static void main (String[] args) {
+ stat.addDescription(testId);
+ TestClient client = new TestClient();
+ client.doTest(args);
+ stat.printSummary(testId);
+ }
+
+ public void doTest(String[] args) {
+
+ String url = args[0];
+ try {
+ int code = invokeServlet(url);
+ report(code);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ private int invokeServlet(String url) throws Exception {
+ log("Invoking url = " + url);
+ URL u = new URL(url);
+ HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
+ int code = c1.getResponseCode();
+ InputStream is = c1.getInputStream();
+ BufferedReader input = new BufferedReader (new InputStreamReader(is));
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ log(line);
+ if(line.indexOf("So the RESULT OF EJB webservice IS") != -1)
+ found1 = true;
+ if(line.indexOf("[WebSvcTest-Hello Appserver Tester !]") != -1)
+ found2 = true;
+ }
+ return code;
+ }
+
+ private void report(int code) {
+ if(code != 200) {
+ log("Incorrect return code: " + code);
+ fail();
+ }
+ if(!found1) {
+ fail();
+ }
+ if(!found2) {
+ fail();
+ }
+ pass();
+ }
+
+ private void log(String message) {
+ System.out.println("[client.TestClient]:: " + message);
+ }
+
+ private void pass() {
+ stat.addStatus(testId, stat.PASS);
+ }
+
+ private void fail() {
+ stat.addStatus(testId, stat.FAIL);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java
new file mode 100644
index 0000000..eed68b7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/Hello.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+
+@WebService(
+targetNamespace="http://endpoint/ejb")
+public interface Hello {
+
+ public String sayHello(String who);
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java
new file mode 100644
index 0000000..9408e5a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/endpoint/ejb/HelloEJB.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2017, 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 endpoint.ejb;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceRef;
+import javax.ejb.Stateless;
+import javax.ejb.SessionContext;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.annotation.Resource;
+import java.sql.*;
+import javax.sql.DataSource;
+
+@WebService(endpointInterface="endpoint.ejb.Hello", targetNamespace="http://endpoint/ejb")
+@Stateless
+public class HelloEJB implements Hello {
+
+ @Resource private SessionContext ctx;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ @TransactionAttribute(TransactionAttributeType.REQUIRED)
+ public String sayHello(String who) {
+ System.out.println("**** EJB Called");
+ Connection con=null;
+ String tableName = "CUSTOMER_rb1";
+ String nameEntry = "Vikas";
+ String emailEntry= "vikas@sun.com";
+
+ try {
+ con = ds.getConnection();
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+
+ updateTable(con, tableName, nameEntry, emailEntry);
+ readData(con, tableName);
+ } catch(Exception ex) {
+ throw new RuntimeException(ex);
+ } finally {
+ try {
+ if(con != null) con.close();
+ } catch (SQLException se) {}
+ }
+ //ctx.setRollbackOnly();
+ return "WebSvcTest-Hello " + who;
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+
+ private void readData(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()){
+ System.out.println("NAME="+rs.getString(1)+", EMAIL="+rs.getString(2));
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/sun-web.xml
new file mode 100644
index 0000000..e4a87c1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/sun-web.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server
+9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
+
+<sun-web-app>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/web.xml b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/web.xml
new file mode 100644
index 0000000..07e1477
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/web.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <description>WebTier for the Calculator Service</description>
+ <display-name>CalculatorWAR</display-name>
+
+ <servlet>
+ <description>Endpoint for Calculator Web Service</description>
+ <display-name>CalculatorWebService</display-name>
+ <servlet-name>Calculator</servlet-name>
+ <servlet-class>endpoint.Calculator</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Calculator</servlet-name>
+ <url-pattern>/webservice/CalculatorService</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/webclient/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/webclient/client/Client.java
new file mode 100644
index 0000000..2bff691
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/jbi-serviceengine/transactions/jse_only_ejbrollback1/webclient/client/Client.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import javax.annotation.Resource;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.naming.InitialContext;
+import javax.transaction.UserTransaction;
+import javax.transaction.Status;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.*;
+import javax.sql.DataSource;
+
+import javax.xml.ws.*;
+import endpoint.ejb.*;
+
+public class Client extends HttpServlet {
+
+ @WebServiceRef(name="sun-web.serviceref/HelloEJBService")
+ HelloEJBService service;
+ @Resource(mappedName="jdbc/__default") private DataSource ds;
+
+ public void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ doPost(req, resp);
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws javax.servlet.ServletException {
+ UserTransaction ut = null;
+ // Create Table with name CUSTOMER_rb1. This name will be used in the EJB
+ String tableName = "CUSTOMER_rb1";
+ String[] names = {"Vikas", "VikasAwasthi"};
+ String[] emails= {"vikas@sun.com", "VikasA@sun.com"};
+ try {
+ Connection con = ds.getConnection();
+ createTable(con, tableName);
+ ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
+ ut.begin();
+
+ updateTable(con, tableName, names[1], emails[1]);
+ System.out.println(" Service is :" + service);
+ Hello port = service.getHelloEJBPort();
+
+ String ret = port.sayHello("Appserver Tester !");
+ System.out.println("Return value from webservice:"+ret);
+ System.out.println("**** rollbacking transaction");
+ ut.rollback();
+
+ if(isDataPresent(con, tableName)) {
+ ret += "FAILED";
+ }
+
+ PrintWriter out = resp.getWriter();
+ resp.setContentType("text/html");
+ out.println("<html>");
+ out.println("<head>");
+ out.println("<title>TestServlet</title>");
+ out.println("</head>");
+ out.println("<body>");
+ out.println("<p>");
+ out.println("So the RESULT OF EJB webservice IS :");
+ out.println("</p>");
+ out.println("[" + ret + "]");
+ out.println("</body>");
+ out.println("</html>");
+ dropTable(con, tableName);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // use this table in the EJB webservice
+ private void createTable(Connection con, String tableName) throws Exception {
+ // autocommit is made true so that the table is created immediately
+ boolean autoCommit = con.getAutoCommit();
+ con.setAutoCommit(true);
+ System.out.println("**** auto commit = " + con.getAutoCommit());
+ PreparedStatement pStmt =
+ con.prepareStatement("CREATE TABLE "+tableName+" (NAME VARCHAR(30) NOT NULL PRIMARY KEY, EMAIL VARCHAR(30))");
+ pStmt.executeUpdate();
+ con.setAutoCommit(autoCommit);
+ }
+
+ private void dropTable(Connection con, String tableName) throws Exception {
+ boolean autoCommit = con.getAutoCommit();
+ con.setAutoCommit(true);
+ PreparedStatement pStmt = con.prepareStatement("DROP TABLE "+tableName);
+ pStmt.executeUpdate();
+ con.setAutoCommit(autoCommit);
+ }
+
+ // Check whether the EJB webservice has updated the data in the table.
+ private boolean isDataPresent(Connection con, String tableName) throws Exception {
+ PreparedStatement pStmt = con.prepareStatement("SELECT NAME, EMAIL FROM "+tableName);
+ ResultSet rs = pStmt.executeQuery();
+ while(rs.next()) {
+ String db_Name = rs.getString(1);
+ String db_Email = rs.getString(2);
+ System.out.println("NAME="+db_Name+", EMAIL="+db_Email);
+ rs.close();
+ return true;
+ }
+ return false;
+ }
+
+ private void updateTable(Connection con, String tableName, String name, String email)
+ throws Exception {
+ PreparedStatement pStmt =
+ con.prepareStatement("INSERT INTO "+ tableName +" (NAME, EMAIL) VALUES(?,?)");
+ pStmt.setString(1, name);
+ pStmt.setString(2, email);
+ pStmt.executeUpdate();
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.properties b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.properties
new file mode 100644
index 0000000..7bfba78
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="signature"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.xml
new file mode 100644
index 0000000..b58f877
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/build.xml
@@ -0,0 +1,132 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="xsd test" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="wscompile-ejb"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . -mapping SignatureMapping_appclient.xml -Xprintstacktrace -Xdebugmodel:appclient.model.txt wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/signature">
+ <fileset dir="output/signature"
+ includes="SignatureTestService.class, SignatureTest.class, MyDateValueType.class, MySecondDateValueType.class"/>
+ </copy>
+<!--
+ <delete dir="output"/>
+-->
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="signatureejb"/>
+ </antcall>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -classpath ${build.classes.dir} -mapping SignatureMapping_ejb.xml -Xprintstacktrace -Xdebugmodel:ejb.model.txt wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="SignatureTestService.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="SignatureMapping_appclient.xml"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="SignatureMapping_appclient.xml,META-INF/wsdl/**,signature/*.class" />
+
+ </antcall>
+ <copy todir="${build.classes.dir}"
+ file="SignatureMapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="SignatureMapping_ejb.xml,META-INF/wsdl/**,signatureejb/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="signature"/>
+ <delete file="SignatureMapping_ejb.xml"/>
+ <delete file="SignatureMapping_appclient.xml"/>
+ <delete file="SignatureTestService.wsdl"/>
+ <delete file="jaxrpc.log"/>
+ <delete file="ejb.model.txt"/>
+ <delete file="appclient.model.txt"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <exec executable="${APPCLIENT}" failonerror="false">
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="http://${http.host}:${http.port}/signatureejb/SignatureTest"/>
+ </exec>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/Client.java
new file mode 100644
index 0000000..24964b1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/Client.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2002, 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 signature;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import java.util.GregorianCalendar;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-signature");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-signatureID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ SignatureTestService testService =
+ (SignatureTestService) ic.lookup("java:comp/env/service/signature");
+ SignatureTest test = testService.getSignatureTestPort();
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+ stat.addStatus("signature client main", stat.PASS);
+
+ try {
+ String msg = test.sayHello("world");
+ System.out.println("MSG: " + msg);
+ stat.addStatus("signature SEI.sayHello(msg)", stat.PASS);
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ stat.addStatus("signature SEI.sayHello(msg)", stat.FAIL);
+ }
+
+
+/* uncomment the following when the date->calendar is done
+ MySecondDateValueType d =
+ new MySecondDateValueType(new java.util.GregorianCalendar(), "Suck it up and do it!");
+ MyDateValueType c = new MyDateValueType();
+ c.setDate(new java.util.GregorianCalendar());
+ c.setWhine("Stop Whining!!");
+ c.setMySecondDateValueTypes(new MySecondDateValueType[0]);
+
+ try {
+ test.setTestDate(new java.util.GregorianCalendar());
+ java.util.Calendar date1 = test.getTestDate();
+ System.out.println("RETURNED LUCKY DATE = " + date1);
+ stat.addStatus("signature SEI.setDate(java.util.Date)", stat.PASS);
+ } catch (Exception e1) {
+ stat.addStatus("signature SEI.setDate(java.util.Date)", stat.FAIL);
+ }
+
+ try {
+ test.setMyDateValueType(c);
+ MyDateValueType date2 = test.getMyDateValueType();
+ System.out.println("RETURNED ANOTHER LUCKY DATE = "
+ + date2.getDate() + "; with message = " + date2.getWhine());
+ stat.addStatus("signature SEI.setValueTypeWithDate", stat.PASS);
+
+ MySecondDateValueType[] seconddates = date2.getMySecondDateValueTypes();
+ if (seconddates != null) {
+ stat.addStatus("signature SEI.setSecondValueTypeArray", stat.PASS);
+ } else {
+ stat.addStatus("signature SEI.setSecondValueTypeArray", stat.FAIL);
+ }
+
+ } catch (Exception e2) {
+ stat.addStatus("signature SEI.setValueTypeWithDate", stat.FAIL);
+ }
+
+ try {
+ test.setMyDateValueTypes(new MyDateValueType[0]);
+ MyDateValueType[] date3 = test.getMyDateValueTypes();
+ System.out.println("RETURNED MULTIPLE LUCKY DATES.size = " + date3.length);
+ stat.addStatus("signature SEI.setValueTypeWithDates", stat.PASS);
+ } catch (Exception e2) {
+ stat.addStatus("signature SEI.setValueTypeWithDates", stat.FAIL);
+ }
+*/
+ } catch (Exception ex) {
+ System.out.println("signature client test failed");
+ ex.printStackTrace();
+ stat.addStatus("signature client main", stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/MANIFEST.MF
new file mode 100644
index 0000000..2ab99b6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: signature.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/config.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/config.xml
new file mode 100644
index 0000000..38b8d74
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="SignatureMapping_ejb.xml"
+ wsdlLocation="SignatureTestService.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application-client.xml
new file mode 100644
index 0000000..fd3f1ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my signature app client</description>
+ <display-name>signatureClient</display-name>
+ <service-ref>
+ <description>signature service ref</description>
+ <service-ref-name>service/signature</service-ref-name>
+ <service-interface>signature.SignatureTestService</service-interface>
+ <wsdl-file>META-INF/wsdl/SignatureTestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SignatureMapping_appclient.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="http://signature.org/wsdl">servicens:SignatureTestService
+ </service-qname>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application.xml
new file mode 100644
index 0000000..0732035
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>SignatureApp</display-name>
+ <module>
+ <java>signature-client.jar</java>
+ </module>
+ <module>
+ <ejb>signature-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..41935d7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>SignatureEjb</ejb-name>
+ <service-endpoint>signatureejb.SignatureTest</service-endpoint>
+ <ejb-class>signatureejb.SignatureEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>SignatureEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..8b0c0a1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/signature</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>signature.SignatureTest</service-endpoint-interface>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:SignatureTestService</namespaceURI>
+ <localpart>SignatureTestService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..aae303d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>SignatureEjb</ejb-name>
+ <jndi-name>SignatureEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>SignatureTestPort</port-component-name>
+ <endpoint-address-uri>signatureejb/SignatureTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/webservices.xml
new file mode 100644
index 0000000..5b94905
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SignatureWebServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SignatureTestService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SignatureMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SignatureTestPort</port-component-name>
+ <wsdl-port xmlns:signaturens="http://signature.org/wsdl">signaturens:SignatureTestPort</wsdl-port>
+ <service-endpoint-interface>signatureejb.SignatureTest</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SignatureEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MyDateValueType.java b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MyDateValueType.java
new file mode 100644
index 0000000..64f30b4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MyDateValueType.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2017, 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 signatureejb;
+
+import java.util.Date;
+
+public class MyDateValueType {
+ protected java.util.Date date;
+ protected String whine;
+ protected MySecondDateValueType[] dates;
+
+ public MyDateValueType() {}
+
+ public MyDateValueType(Date date, java.lang.String whine,
+ MySecondDateValueType[] dates) {
+ this.date = date;
+ this.whine = whine;
+ this.dates = dates;
+ }
+
+ public java.util.Date getDate() {
+ return date;
+ }
+
+ public void setDate(java.util.Date date) {
+ this.date = date;
+ }
+
+ public java.lang.String getWhine() {
+ return whine;
+ }
+
+ public void setWhine(java.lang.String whine) {
+ this.whine = whine;
+ }
+
+ public MySecondDateValueType[] getMySecondDateValueTypes() {
+ return dates;
+ }
+
+ public void setMySecondDateValueTypes(MySecondDateValueType[] dates) {
+ this.dates = dates;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MySecondDateValueType.java b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MySecondDateValueType.java
new file mode 100644
index 0000000..7b3f63a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/MySecondDateValueType.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017, 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 signatureejb;
+
+import java.util.Date;
+
+public class MySecondDateValueType {
+ protected java.util.Date date;
+ protected String whine;
+
+ public MySecondDateValueType() {
+ }
+
+ public MySecondDateValueType(Date date, java.lang.String whine) {
+ this.date = date;
+ this.whine = whine;
+ }
+
+ public java.util.Date getDate() {
+ return date;
+ }
+
+ public void setDate(java.util.Date date) {
+ this.date = date;
+ }
+
+ public java.lang.String getWhine() {
+ return whine;
+ }
+
+ public void setWhine(java.lang.String whine) {
+ this.whine = whine;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureEJB.java b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureEJB.java
new file mode 100644
index 0000000..f68cebb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureEJB.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2002, 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 signatureejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+import javax.xml.rpc.handler.MessageContext;
+import java.util.Date;
+
+public class SignatureEJB implements SessionBean {
+ private SessionContext sc;
+
+ private java.util.Date date;
+ private MyDateValueType myDate;
+ private MyDateValueType[] myDates;
+
+ public SignatureEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SignatureEJB::ejbCreate !!");
+ }
+
+ public void SetTestDate(java.util.Date testDate) {
+ System.out.println("In SignatureEJB::setTestDate = " + testDate);
+ date = testDate;
+ }
+
+ public java.util.Date GetTestDate() {
+ System.out.println("In SignatureEJB::getTestDate !!");
+ return date;
+ }
+
+ public void setMyDateValueType(MyDateValueType mytestdate) {
+ System.out.println("In SignatureEJB::setMyDateValueType: date = "
+ + mytestdate.getDate() + " ; whine = " + mytestdate.getWhine());
+ myDate = mytestdate;
+ }
+
+ public MyDateValueType getMyDateValueType() {
+ System.out.println("In SignatureEJB::getMyDateValueType !!");
+ return myDate;
+ }
+
+ public void setMyDateValueTypes(MyDateValueType[] mytestdates) {
+ System.out.println("In SignatureEJB::setMyDateValueTypes: dates.size = "
+ + mytestdates.length);
+ myDates = mytestdates;
+ }
+
+ public MyDateValueType[] getMyDateValueTypes() {
+ System.out.println("In SignatureEJB::getMyDateValueTypes !!");
+ return myDates;
+ }
+
+ public String SayHello(String msg) {
+ System.out.println("In SignatureEJB::SayHello !!");
+ return "Hello! " + msg;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureTest.java b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureTest.java
new file mode 100644
index 0000000..d890e27
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/signatureejb/SignatureTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, 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 signatureejb;
+
+import java.util.Date;
+
+public interface SignatureTest extends java.rmi.Remote {
+
+/*
+ public void SetTestDate(java.util.Date testDate) throws java.rmi.RemoteException;
+ public java.util.Date GetTestDate() throws java.rmi.RemoteException;
+*/
+
+
+/*
+ public void setMyDateValueType(MyDateValueType myDate) throws java.rmi.RemoteException;
+ public MyDateValueType getMyDateValueType() throws java.rmi.RemoteException;
+ public void setMyDateValueTypes(MyDateValueType[] myDate) throws java.rmi.RemoteException;
+ public MyDateValueType[] getMyDateValueTypes() throws java.rmi.RemoteException;
+*/
+
+ public String SayHello(String hello) throws java.rmi.RemoteException;
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_appclient.xml
new file mode 100644
index 0000000..8732c3c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="SignatureTestService.wsdl"
+ packageName="signature"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_ejb.xml
new file mode 100644
index 0000000..771ca5b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/mapping/j2w/signature/wscompile_config_ejb.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="SignatureTestService"
+ targetNamespace="http://signature.org/wsdl"
+ typeNamespace="http://signature.org/types"
+ packageName="signatureejb">
+ <interface name="signatureejb.SignatureTest"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/FirstImport.wsdl b/appserver/tests/appserv-tests/devtests/webservice/ns2package/FirstImport.wsdl
new file mode 100755
index 0000000..93acf4b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/FirstImport.wsdl
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="NamespaceToPackageTest"
+ targetNamespace="http://ns2package.org/firstimport/FirstImport.wsdl"
+ xmlns:tns="http://ns2package.org/firstimport/FirstImport.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns1="http://ns2package.org/secondimport/types">
+
+ <types>
+ <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:import namespace="http://ns2package.org/secondimport/types" schemaLocation="SecondImport.xsd"/>
+ </xs:schema>
+ </types>
+
+ <message name="Test1Request">
+ <part name="params" element="ns1:Test1Request"/>
+ </message>
+
+ <message name="Test1Response">
+ <part name="result" element="ns1:Test1Response"/>
+ </message>
+
+ <portType name="Test">
+ <operation name="test1">
+ <input message="tns:Test1Request"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <binding name="TestBinding" type="tns:Test">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/IncludedDefs.xsd b/appserver/tests/appserv-tests/devtests/webservice/ns2package/IncludedDefs.xsd
new file mode 100755
index 0000000..90fc0be
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/IncludedDefs.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<schema
+ targetNamespace="http://ns2package.org/secondimport/types"
+ xmlns:voo="http://ns2package.org/secondimport/types"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified">
+
+ <xsd:complexType name="SingleWildcardType">
+ <xsd:sequence>
+ <xsd:element name="foo" type="xsd:int"/>
+ <xsd:element name="bar" type="xsd:string"/>
+ <xsd:element name="voo" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="RepeatedWildcardType">
+ <xsd:sequence>
+ <xsd:element name="foo" type="xsd:int"/>
+ <xsd:element name="bar" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+</schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/README b/appserver/tests/appserv-tests/devtests/webservice/ns2package/README
new file mode 100644
index 0000000..fe868dc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/README
@@ -0,0 +1,2 @@
+
+test out whether the import namespaces will be mapped correctly.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/SecondImport.xsd b/appserver/tests/appserv-tests/devtests/webservice/ns2package/SecondImport.xsd
new file mode 100755
index 0000000..835e05a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/SecondImport.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<schema
+ targetNamespace="http://ns2package.org/secondimport/types"
+ xmlns:tns="http://ns2package.org/secondimport/types"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation = "IncludedDefs.xsd"/>
+
+ <xsd:element name="Test1Request" type="tns:Test1RequestType"/>
+ <xsd:complexType name="Test1RequestType">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:int"/>
+ <xsd:element name="c" type="tns:SingleWildcardType"/>
+ <xsd:element name="d" type="tns:RepeatedWildcardType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="Test1Response" type="tns:Test1ResponseType"/>
+ <xsd:complexType name="Test1ResponseType">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+</schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/config.xml b/appserver/tests/appserv-tests/devtests/webservice/ns2package/config.xml
new file mode 100644
index 0000000..0f4e4e5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="mapping.xml"
+ wsdlLocation="ns2package.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/mapping.xml b/appserver/tests/appserv-tests/devtests/webservice/ns2package/mapping.xml
new file mode 100644
index 0000000..1b87e99
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/mapping.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
+ <package-mapping>
+ <package-type>ns2package</package-type>
+ <namespaceURI>http://ns2package.org/ns2package.wsdl</namespaceURI>
+ </package-mapping>
+ <java-xml-type-mapping>
+ <class-type>ns2package.RepeatedWildcardType</class-type>
+ <root-type-qname xmlns:typeNS="http://ns2package.org/secondimport/types">typeNS:RepeatedWildcardType</root-type-qname>
+ <qname-scope>element</qname-scope>
+ <variable-mapping>
+ <java-variable-name>foo</java-variable-name>
+ <xml-element-name>foo</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>bar</java-variable-name>
+ <xml-element-name>bar</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <class-type>ns2package.Test1RequestType</class-type>
+ <root-type-qname xmlns:typeNS="http://ns2package.org/secondimport/types">typeNS:Test1RequestType</root-type-qname>
+ <qname-scope>element</qname-scope>
+ <variable-mapping>
+ <java-variable-name>a</java-variable-name>
+ <xml-element-name>a</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>c</java-variable-name>
+ <xml-element-name>c</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>d</java-variable-name>
+ <xml-element-name>d</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <class-type>ns2package.Test1ResponseType</class-type>
+ <root-type-qname xmlns:typeNS="http://ns2package.org/secondimport/types">typeNS:Test1ResponseType</root-type-qname>
+ <qname-scope>element</qname-scope>
+ <variable-mapping>
+ <java-variable-name>a</java-variable-name>
+ <xml-element-name>a</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <java-xml-type-mapping>
+ <class-type>ns2package.SingleWildcardType</class-type>
+ <root-type-qname xmlns:typeNS="http://ns2package.org/secondimport/types">typeNS:SingleWildcardType</root-type-qname>
+ <qname-scope>element</qname-scope>
+ <variable-mapping>
+ <java-variable-name>foo</java-variable-name>
+ <xml-element-name>foo</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>bar</java-variable-name>
+ <xml-element-name>bar</xml-element-name>
+ </variable-mapping>
+ <variable-mapping>
+ <java-variable-name>voo</java-variable-name>
+ <xml-element-name>voo</xml-element-name>
+ </variable-mapping>
+ </java-xml-type-mapping>
+ <service-interface-mapping>
+ <service-interface>ns2package.TestService</service-interface>
+ <wsdl-service-name xmlns:serviceNS="http://ns2package.org/ns2package.wsdl">serviceNS:TestService</wsdl-service-name>
+ <port-mapping>
+ <port-name>TestPort</port-name>
+ <java-port-name>TestPort</java-port-name>
+ </port-mapping>
+ </service-interface-mapping>
+ <service-endpoint-interface-mapping>
+ <service-endpoint-interface>ns2package.Test</service-endpoint-interface>
+ <wsdl-port-type xmlns:portTypeNS="http://ns2package.org/firstimport/FirstImport.wsdl">portTypeNS:Test</wsdl-port-type>
+ <wsdl-binding xmlns:bindingNS="http://ns2package.org/firstimport/FirstImport.wsdl">bindingNS:TestBinding</wsdl-binding>
+ <service-endpoint-method-mapping>
+ <java-method-name>test1</java-method-name>
+ <wsdl-operation>test1</wsdl-operation>
+ <wrapped-element/>
+ <method-param-parts-mapping>
+ <param-position>0</param-position>
+ <param-type>int</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="http://ns2package.org/firstimport/FirstImport.wsdl">wsdlMsgNS:Test1Request</wsdl-message>
+ <wsdl-message-part-name>a</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <method-param-parts-mapping>
+ <param-position>1</param-position>
+ <param-type>ns2package.SingleWildcardType</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="http://ns2package.org/firstimport/FirstImport.wsdl">wsdlMsgNS:Test1Request</wsdl-message>
+ <wsdl-message-part-name>c</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <method-param-parts-mapping>
+ <param-position>2</param-position>
+ <param-type>ns2package.RepeatedWildcardType</param-type>
+ <wsdl-message-mapping>
+ <wsdl-message xmlns:wsdlMsgNS="http://ns2package.org/firstimport/FirstImport.wsdl">wsdlMsgNS:Test1Request</wsdl-message>
+ <wsdl-message-part-name>d</wsdl-message-part-name>
+ <parameter-mode>IN</parameter-mode>
+ </wsdl-message-mapping>
+ </method-param-parts-mapping>
+ <wsdl-return-value-mapping>
+ <method-return-value>int</method-return-value>
+ <wsdl-message xmlns:wsdlMsgNS="http://ns2package.org/firstimport/FirstImport.wsdl">wsdlMsgNS:Test1Response</wsdl-message>
+ <wsdl-message-part-name>a</wsdl-message-part-name>
+ </wsdl-return-value-mapping>
+ </service-endpoint-method-mapping>
+ </service-endpoint-interface-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/ns2package.wsdl b/appserver/tests/appserv-tests/devtests/webservice/ns2package/ns2package.wsdl
new file mode 100755
index 0000000..2bc74d4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/ns2package.wsdl
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="NamespaceToPackageTest"
+ targetNamespace="http://ns2package.org/ns2package.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:mts1="http://ns2package.org/firstimport/FirstImport.wsdl"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <import
+ namespace="http://ns2package.org/firstimport/FirstImport.wsdl"
+ location="FirstImport.wsdl"/>
+
+ <types/>
+
+ <service name="TestService">
+ <port name="TestPort" binding="mts1:TestBinding">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/ns2package/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/ns2package/wscompile_config_ejb.xml
new file mode 100644
index 0000000..deab13f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/ns2package/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="ns2package.wsdl"
+ packageName="ns2package"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/report.xml b/appserver/tests/appserv-tests/devtests/webservice/report.xml
new file mode 100644
index 0000000..65a32ae
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/report.xml
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/resultCount.sh b/appserver/tests/appserv-tests/devtests/webservice/resultCount.sh
new file mode 100644
index 0000000..b254f60
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2017, 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
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=86
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/webservice/count.txt;
+date>>$APS_HOME/devtests/webservice/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/webservice/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/webservice/count.txt;
+echo "************************">>$APS_HOME/devtests/webservice/count.txt;
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/NoMetadata.SimpleTest.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/NoMetadata.SimpleTest.xml
new file mode 100644
index 0000000..deb1b90
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/NoMetadata.SimpleTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
+ version="1.1">
+
+ <package-mapping>
+ <package-type>rpcencoded</package-type>
+ <namespaceURI>http://simpletestservice.org/wsdl</namespaceURI>
+ </package-mapping>
+</java-wsdl-mapping>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/README b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/README
new file mode 100644
index 0000000..558aff5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/README
@@ -0,0 +1,4 @@
+This is a unit test for rpc/encoded using operation one_way
+using simple mapping and full mapping
+
+With servlet endpoint.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/SimpleTest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/SimpleTest.wsdl
new file mode 100644
index 0000000..f6fc2f6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/SimpleTest.wsdl
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="HelloOnewayService"
+ targetNamespace="http://simpletestservice.org/wsdl"
+ xmlns:tns="http://simpletestservice.org/wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types/>
+ <message name="hello">
+ <part name="string" type="xsd:string"/>
+ </message>
+ <message name="helloResponse">
+ <part name="result" type="xsd:string"/>
+ </message>
+ <message name="helloOneWay">
+ <part name="string" type="xsd:string"/>
+ </message>
+ <message name="helloOneWayResponse"/>
+ <portType name="Hello">
+ <operation name="hello">
+ <input message="tns:hello"/>
+ <output message="tns:helloResponse"/>
+ </operation>
+ <operation name="helloOneWay">
+ <input message="tns:helloOneWay"/>
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="hello">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://simpletestservice.org/wsdl"/>
+ </input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://simpletestservice.org/wsdl"/>
+ </output>
+ <soap:operation soapAction=""/>
+ </operation>
+ <operation name="helloOneWay">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://simpletestservice.org/wsdl"/>
+ </input>
+ <soap:operation soapAction=""/>
+ </operation>
+ </binding>
+ <service name="HelloOnewayService">
+ <port name="HelloPort" binding="tns:HelloBinding">
+ <soap:address location="http://localhost:1024/RPCEncodedOneway/Hello"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.properties b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.properties
new file mode 100644
index 0000000..18d8f0e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.properties
@@ -0,0 +1,41 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpcencodedOneway"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
+<property name="mappingfile.location" value="${basedir}"/>
+<property name="mappingfile.name" value="SimpleTest.xml"/>
+<property name="wsdlfile.location" value="${basedir}"/>
+<property name="wsdlfile.name" value="SimpleTest.wsdl"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.xml
new file mode 100644
index 0000000..a5afd3f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/build.xml
@@ -0,0 +1,161 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="RPC Encoded Oneway " default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+<!--
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+-->
+
+ <target name="all" depends="simple-mapping, full-mapping"/>
+ <target name="simple-mapping"
+ depends="build-simple-mapping,deploy,assemble-client, run,undeploy"/>
+ <target name="full-mapping"
+ depends="build-full-mapping,deploy,run,undeploy"/>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="rpcencoded"/>
+ </antcall>
+ </target>
+
+ <target name="build-simple-mapping" depends="init-common, clean">
+ <antcall target="wscompile"/>
+ <copy file="NoMetadata.SimpleTest.xml" tofile="${mappingfile.name}"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="build-full-mapping" depends="init-common, clean">
+ <delete file="${mappingfile.name}"/>
+ <antcall target="gen-mapping"/>
+ <antcall target="wscompile"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/WEB-INF/wsdl" file="SimpleTest.wsdl"/>
+
+ <!-- nasty workaround for the harness to include the mapping file for wars -->
+ <copy todir="${build.classes.dir}/tmp" file="${mappingfile.name}"/>
+
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="SimpleTest.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="NoMetadata.SimpleTest.xml"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="NoMetadata.SimpleTest.xml,META-INF/wsdl/**,rpcencoded/*.class,com/**" />
+ </antcall>
+ <move file="${assemble.dir}/${appname}-client.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}//RPCEncodedOneway/Hello"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="vo_output"/>
+ <delete file="${mappingfile.name}"/>
+ <delete file="onewayModel.txt"/>
+ <delete file ="/tmp/debugModel.txt"/>
+ <delete file ="/tmp/debugModel.model"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="wscompile" depends="init-common">
+ <mkdir dir="vo_output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d vo_output -classpath . wscompile_config.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/rpcencoded">
+ <fileset dir="vo_output/rpcencoded"
+ includes="Hello.class"/>
+ </copy>
+ <delete dir="vo_output"/>
+ </target>
+
+
+ <target name="gen-mapping" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <!-- use model -->
+<!--
+ <param name="wscompile.command"
+ value="-gen -cp . -keep -d output -Xdebugmodel:onewayModel.txt -model ${mappingfile.name} wscompile_config.xml"/>
+-->
+
+ <!-- use mapping -->
+ <param name="wscompile.command"
+ value="-import -cp . -keep -d output -Xdebugmodel:onewayModel.txt -mapping ${mappingfile.name} wscompile_config.xml"/>
+ </antcall>
+ <delete dir="output"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ ant clean
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/application.xml
new file mode 100644
index 0000000..ae6d30d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>RPCEncodedOnewayTest</display-name>
+ <module>
+ <web>
+ <web-uri>rpcencodedOneway-web.war</web-uri>
+ <context-root>RPCEncodedOneway</context-root>
+ </web>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/sun-web.xml
new file mode 100644
index 0000000..075252a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/sun-web.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>RPCEncodedOnewayTest</webservice-description-name>
+ <wsdl-publish-location>http://localhost:1024/RPCEncodedOneway/Hello?WSDL</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/web.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/web.xml
new file mode 100644
index 0000000..794ecc6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>RPCEncodedOnewayTest</display-name>
+ <servlet>
+ <servlet-name>XmlServletName</servlet-name>
+ <servlet-class>rpcencoded.HelloImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>XmlServletName</servlet-name>
+ <url-pattern>/Hello</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/webservices.xml
new file mode 100644
index 0000000..a7cf44a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/descriptor/webservices.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd">
+ <webservice-description>
+ <webservice-description-name>RPCEncodedOneWayTest</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SimpleTest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleTest.xml</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>HelloPort</port-component-name>
+ <wsdl-port xmlns:wsdl="http://simpletestservice.org/wsdl">wsdl:HelloPort</wsdl-port>
+ <service-endpoint-interface>rpcencoded.Hello</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>XmlServletName</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/docroot/README b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/docroot/README
new file mode 100644
index 0000000..1ac4e4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/docroot/README
@@ -0,0 +1,2 @@
+this is a fake directory to work around the
+quicklook hardness problem.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/rpcencoded/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/rpcencoded/HelloImpl.java
new file mode 100644
index 0000000..3c2c9f0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/rpcencoded/HelloImpl.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002, 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 rpcencoded;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+import javax.xml.rpc.server.ServiceLifecycle;
+
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+public class HelloImpl implements javax.servlet.SingleThreadModel, ServiceLifecycle {
+
+ private boolean gotInit = false;
+
+ public void init(Object o) {
+ System.out.println("Got ServiceLifecycle::init call " + o);
+ gotInit = true;
+ }
+
+ public void destroy() {
+ System.out.println("Got ServiceLifecycle::destroy call");
+ }
+
+ public String hello(String s) throws RemoteException {
+ return "Hello, " + s + "!";
+ }
+
+ public void helloOneWay(String s) throws RemoteException {
+ System.out.println("Hello one way, " + s + "!");
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/wscompile_config.xml
new file mode 100644
index 0000000..a3249e7
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpcencoded_oneway/wscompile_config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="SimpleTest.wsdl"
+ packageName="rpcencoded">
+ </wsdl>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/SimpleTest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/rpclit/SimpleTest.wsdl
new file mode 100644
index 0000000..0972819
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/SimpleTest.wsdl
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="urn:SimpleTest"
+ targetNamespace="urn:SimpleTest"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="urn:SimpleTest"
+ xmlns:s="http://SimpleTest.org/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://SimpleTest.org/xsd">
+
+ <element name="echoString" type="s:echoStringType"/>
+ <complexType name="echoStringType">
+ <sequence>
+ <element name="inputString" type="xsd:string" nillable="true"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </sequence>
+ </complexType>
+
+ <element name="stringResponseName" type="s:stringResponseNameType"/>
+ <complexType name="stringResponseNameType">
+ <sequence>
+ <element name="responseString"
+ type="xsd:string"
+ nillable="true"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+
+ <message name="echoString">
+ <part name="body" type="s:echoStringType"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="return" type="s:stringResponseNameType"/>
+ </message>
+
+ <portType name="SimpleTest">
+ <operation name="echoString" parameterOrder="body" >
+ <input message="tns:echoString"/>
+ <output message="tns:echoStringResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="SimpleTestBinding" type="tns:SimpleTest">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="http://SimpleTest.org/"/>
+ <input> <soap:body use="literal" namespace="http://SimpleTest.org/xsd"/> </input>
+ <output> <soap:body use="literal" namespace="http://SimpleTest.org/xsd"/> </output>
+ </operation>
+ </binding>
+
+ <service name="SimpleTestService">
+ <port name="SimpleTest" binding="tns:SimpleTestBinding">
+ <soap:address location="http://localhost:1024/rpclit/SimpleTest"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.properties b/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.properties
new file mode 100644
index 0000000..f52b31e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.properties
@@ -0,0 +1,28 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="rpclit"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.xml
new file mode 100644
index 0000000..93f91a0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/build.xml
@@ -0,0 +1,121 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Rpc Lit" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,assemble,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="rpclit"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-ejb"/>
+ </target>
+
+ <target name="assemble" depends="init-common, build, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="SimpleTest.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="RpcLitMapping.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="RpcLitMapping.xml,META-INF/wsdl/**,rpclit/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete file="RpcLitMapping.xml"/>
+ <delete file="anyRpcModel.txt"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/rpclit">
+ <fileset dir="output/rpclit"
+ includes="SimpleTest.class,EchoStringType.class,StringResponseNameType.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <!-- use model -->
+ <param name="wscompile.command"
+ value="-gen -cp . -keep -d output -Xdebugmodel:anyRpcModel.txt -model RpcLitMapping.xml wscompile_config.xml"/>
+
+ <!-- use mapping -->
+<!--
+ <param name="wscompile.command"
+ value="-gen -cp . -keep -d output -Xdebugmodel:anyRpcModel.txt -mapping RpcLitMapping.xml wscompile_config.xml"/>
+-->
+ </antcall>
+ <delete dir="output"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ ant clean
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/application.xml
new file mode 100644
index 0000000..70da37a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/application.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>RpcLitApp</display-name>
+ <module>
+ <ejb>rpclit-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..6b03ee9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>RpcLitEjb</ejb-name>
+ <service-endpoint>rpclit.SimpleTest</service-endpoint>
+ <ejb-class>rpclit.SimpleTestImpl</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>RpcLitEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..9188e63
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>RpcLitEjb</ejb-name>
+ <jndi-name>RpcLitEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>SimpleTest</port-component-name>
+ <endpoint-address-uri>rpclit/SimpleTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/webservices.xml
new file mode 100644
index 0000000..77ef3cc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/descriptor/webservices.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>RpcLitEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SimpleTest.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>RpcLitMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleTest</port-component-name>
+ <wsdl-port xmlns:rpclitNS="urn:SimpleTest">rpclitNS:SimpleTest</wsdl-port>
+ <service-endpoint-interface>
+ rpclit.SimpleTest
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>RpcLitEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/rpclit/SimpleTestImpl.java b/appserver/tests/appserv-tests/devtests/webservice/rpclit/rpclit/SimpleTestImpl.java
new file mode 100644
index 0000000..421751a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/rpclit/SimpleTestImpl.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2002, 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
+ */
+
+/*
+ * @(#)SimpleTestImpl.java 1.3 02/04/05
+ */
+
+package rpclit;
+
+import java.rmi.RemoteException;
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+
+// Service Implementation Class - as outlined in JAX-RPC Specification
+
+public class SimpleTestImpl implements SessionBean {
+
+ private SessionContext sc;
+
+ public SimpleTestImpl(){}
+
+ public EchoStringType echoString(StringResponseNameType v)
+ throws RemoteException
+ {
+ return null; //for now
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SimpleTestImpl::ejbCreate !!");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/rpclit/wscompile_config.xml b/appserver/tests/appserv-tests/devtests/webservice/rpclit/wscompile_config.xml
new file mode 100644
index 0000000..7df0d33
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/rpclit/wscompile_config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="SimpleTest.wsdl"
+ packageName="rpclit"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/run_test.sh b/appserver/tests/appserv-tests/devtests/webservice/run_test.sh
new file mode 100755
index 0000000..033e879
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/run_test.sh
@@ -0,0 +1,70 @@
+#!/bin/bash -ex
+#
+# Copyright (c) 2017, 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
+#
+
+list_test_ids(){
+ echo webservice_all
+}
+
+test_run(){
+ $S1AS_HOME/bin/asadmin start-domain
+ cd $APS_HOME/devtests/webservice
+ ant $TARGET | tee $TEST_RUN_LOG
+ $S1AS_HOME/bin/asadmin stop-domain
+}
+
+run_test_id(){
+ #a common util script located at main/appserver/tests/common_test.sh
+ source `dirname $0`/../../../common_test.sh
+ kill_process
+ delete_gf
+ download_test_resources glassfish.zip version-info.txt
+ unzip_test_resources $WORKSPACE/bundles/glassfish.zip
+ cd `dirname $0`
+ test_init
+ get_test_target $1
+ #run the actual test function
+ test_run
+ check_successful_run
+ generate_junit_report $1
+ change_junit_report_class_names
+}
+
+post_test_run(){
+ copy_test_artifects
+ upload_test_results
+ delete_bundle
+ cd -
+}
+
+get_test_target(){
+ case $1 in
+ webservice_all )
+ TARGET=all
+ export TARGET;;
+ esac
+
+}
+
+OPT=$1
+TEST_ID=$2
+case $OPT in
+ list_test_ids )
+ list_test_ids;;
+ run_test_id )
+ trap post_test_run EXIT
+ run_test_id $TEST_ID ;;
+esac
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/build.xml b/appserver/tests/appserv-tests/devtests/webservice/security/build.xml
new file mode 100644
index 0000000..0b38bee
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/build.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:../../../config/common.xml">
+<!ENTITY reporting SYSTEM "file:../report.xml">
+]>
+
+<project name="webservice_security" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &reporting;
+
+ <target name="check-nss" depends="init-common">
+ <!--
+ Determine if we need to use the certutil or the keytool command to
+ access the certificate truststore
+ -->
+ <property name="nss.db.dir" location="${admin.domain.dir}/${admin.domain}/config"/>
+ <condition property="use.certutil">
+ <and>
+ <or>
+ <available file="${env.S1AS_HOME}/lib/certutil"/>
+ <available file="${env.S1AS_HOME}/lib/certutil.exe"/>
+ </or>
+ <available file="${nss.db.dir}/cert8.db"/>
+ <available file="${nss.db.dir}/key3.db"/>
+ <available file="${nss.db.dir}/secmod.db"/>
+ </and>
+ </condition>
+ </target>
+
+
+ <target name="setup" depends="init-common, check-nss">
+ <echo message="Creating the valid certificate in kestore.jks"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="false">
+ <arg value="-genkey"/>
+ <arg value="-alias"/>
+ <arg value="s1astester"/>
+ <arg value="-keypass"/>
+ <arg value="${ssl.password}"/>
+ <arg value="-keystore"/>
+ <arg value="keystore.jks"/>
+ <arg value="-storepass"/>
+ <arg value="${ssl.password}"/>
+ <arg value="-dname"/>
+ <arg value="cn=Duke Smith, ou=Purchasing, o=BlueSoft, c=US"/>
+ </exec>
+ <echo message="Creating the invalid certificate in invalid_kestore.jks"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="false">
+ <arg value="-genkey"/>
+ <arg value="-alias"/>
+ <arg value="s1astester"/>
+ <arg value="-keypass"/>
+ <arg value="${ssl.password}"/>
+ <arg value="-keystore"/>
+ <arg value="invalid_keystore.jks"/>
+ <arg value="-storepass"/>
+ <arg value="${ssl.password}"/>
+ <arg value="-dname"/>
+ <arg value="cn=Unknown Duke, ou=Prog, o=HackSoft, c=US"/>
+ </exec>
+ <antcall target="setup-pe"/>
+ <antcall target="setup-ee"/>
+ </target>
+
+
+ <target name="setup-pe" depends="init-common" unless="use.certutil">
+ <echo message="Exporting appserver public key from ${admin.domain}"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-export -alias s1as -keystore ${env.S1AS_HOME}/domains/${admin.domain}/config/keystore.jks -storepass ${ssl.password} -file appserver.cer"/>
+ </exec>
+ <echo message="Importing the Appserver certificate"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-import -noprompt -alias s1as -keystore cacerts.jks -storepass ${ssl.password} -file appserver.cer"/>
+ </exec>
+ <echo message="Extracting tester public key"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-export -alias s1astester -keystore keystore.jks -storepass ${ssl.password} -file client.cer"/>
+ </exec>
+ <echo message="Importing tester public key in appserver trusted certificates"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-import -noprompt -alias s1astester -keystore ${env.S1AS_HOME}/domains/${admin.domain}/config/cacerts.jks -storepass ${ssl.password} -file client.cer"/>
+ </exec>
+ <antcall target="restart-pe-server"/>
+ </target>
+
+ <target name="setup-ee" depends="init-common" if="use.certutil">
+ <echo message="Exporting appserver public key from ${admin.domain}"/>
+ <exec executable ="${env.S1AS_HOME}/lib/certutil" failonerror="true">
+ <env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
+ <arg line="-L -n s1as -d ${env.S1AS_HOME}/domains/${admin.domain}/config -a -o appserver.cer"/>
+ </exec>
+
+ <echo message="Importing the Appserver certificate on the client keystore"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-import -noprompt -alias s1as -keystore cacerts.jks -storepass ${ssl.password} -file appserver.cer"/>
+ </exec>
+ <echo message="Extracting tester public key"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-export -rfc -alias s1astester -keystore keystore.jks -storepass ${ssl.password} -file client.cer"/>
+ </exec>
+ <echo message="Importing tester public key in appserver trusted certificates"/>
+ <exec executable ="${env.S1AS_HOME}/lib/certutil" failonerror="true">
+ <env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
+ <arg line="-A -a -n s1astester -t CTP,CTP,CTP -d ${env.S1AS_HOME}/domains/${admin.domain}/config -i client.cer"/>
+ </exec>
+ <antcall target="restart-ee-server"/>
+ </target>
+
+ <target name="restart-pe-server">
+ <echo message="Restarting PE server..."/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="stop-domain"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain"/>
+ </exec>
+ </target>
+
+ <target name="restart-ee-server">
+ <echo message="Restarting EE server..."/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="stop-domain"/>
+ </exec>
+ <exec executable="${ASADMIN}" failonerror="true">
+ <arg line="start-domain --user ${admin.user} --passwordfile ${admin.password.file}"/>
+ </exec>
+ </target>
+
+ <target name="unsetup" depends="init-common, check-nss">
+ <delete file="cacerts.jks"/>
+ <delete file="invalid_keystore.jks"/>
+ <delete file="keystore.jks"/>
+ <delete file="appserver.cer"/>
+ <delete file="client.cer"/>
+ <antcall target="unsetup-pe"/>
+ <antcall target="unsetup-ee"/>
+ </target>
+
+
+ <target name="unsetup-pe" depends="init-common" unless="use.certutil">
+ <echo message="Removing tester public key from appserver trusted certificates"/>
+ <exec executable="${java.home}/bin/keytool" failonerror="true">
+ <arg line="-delete -alias s1astester -keystore ${env.S1AS_HOME}/domains/${admin.domain}/config/cacerts.jks -storepass ${ssl.password}"/>
+ </exec>
+ <antcall target="restart-pe-server"/>
+ </target>
+
+ <target name="unsetup-ee" depends="init-common" if="use.certutil">
+ <echo message="Removing tester public key from appserver trusted certificates"/>
+ <exec executable ="${env.S1AS_HOME}/lib/certutil" failonerror="true">
+ <env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
+ <arg line="-D -n s1astester -d ${env.S1AS_HOME}/domains/${admin.domain}/config"/>
+ </exec>
+ <antcall target="restart-ee-server"/>
+ </target>
+
+ <target name="all">
+ <antcall target="setup"/>
+ <ant dir="ejb_ssl_cacert" target="all"/>
+ <ant dir="ejb3_ssl_cacert" target="all"/>
+ <antcall target="unsetup"/>
+ </target>
+ <target name="clean">
+ <delete>
+ <fileset dir="${basedir}"
+ includes="**.output, count.txt"/>
+ </delete>
+ <ant dir="ejb_ssl_cacert" target="clean"/>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes all the webservice security tests)
+
+ ant ejb_ssl_cacert (Executes the client certificate ejb ssl endpoint test)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/common.xml b/appserver/tests/appserv-tests/devtests/webservice/security/common.xml
new file mode 100644
index 0000000..7dd6f79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/common.xml
@@ -0,0 +1,59 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+ <!-- run appclient in AppServ -->
+ <target name="runclient-secure" depends="init-common">
+
+ <echo message="Executing appclient at Basedir:${basedir}" />
+ <echo message="Appclient jar: ${assemble.dir}/${appname}AppClient.jar"
+ />
+ <echo message="Appname: ${appname}" />
+ <echo message="Display name for appclient: ${appname}Client" />
+ <echo message="appclient -client ${assemble.dir}/${appname}AppClient.jar -name ${appname}Client -textauth -user j2ee -password j2ee -xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/>
+ <exec executable="${APPCLIENT}" failonerror="false">
+ <env key="VMARGS" value="-Djavax.net.ssl.keyStore=${basedir}/../keystore.jks -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStore=${basedir}/../cacerts.jks -Djavax.net.ssl.trustStorePassword=changeit"/>
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-name ${appname}Client"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="-xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ </target>
+
+ <!-- run appclient in AppServ -->
+ <target name="runclient-invalid-secure" depends="init-common">
+
+ <echo message="Executing appclient at Basedir:${basedir}" />
+ <echo message="Appclient jar: ${assemble.dir}/${appname}AppClient.jar"
+ />
+ <echo message="Appname: ${appname}" />
+ <echo message="Display name for appclient: ${appname}Client" />
+ <echo message="appclient -client ${assemble.dir}/${appname}AppClient.jar -name ${appname}Client -textauth -user j2ee -password j2ee -xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/>
+ <exec executable="${APPCLIENT}" failonerror="false">
+ <env key="VMARGS" value="-Djavax.net.ssl.keyStore=${basedir}/../invalid_keystore.jks -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStore=${basedir}/../cacerts.jks -Djavax.net.ssl.trustStorePassword=changeit"/>
+ <arg line="-client ${assemble.dir}/${appname}AppClient.jar"/>
+ <arg line="-name ${appname}Client"/>
+ <arg line="-textauth"/>
+ <arg line="-user j2ee"/>
+ <arg line="-password j2ee"/>
+ <arg line="-xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="${appclient.application.args}"/>
+ </exec>
+ </target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/build.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/build.xml
new file mode 100644
index 0000000..7c85409
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/build.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonAnnotations SYSTEM "file:./../../ejb_annotations/annotations-common.xml">
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY common SYSTEM "file:./../common.xml">
+]>
+
+<project name="EJB3_SSL_CACERT" default="core" basedir=".">
+
+ &commonAnnotations;
+ &commonSetup;
+ &commonBuild;
+ &common;
+ <property name="src-name" value="endpoint/HelloImpl.java"/>
+ <property name="client-src-name" value="client/Client.java"/>
+ <property name="app-client-parameters" value="-xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml"/>
+
+ <target name="test-build">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <dirname file="${src-name}" property="directory"/>
+ <basename file="${directory}" property="pkg-name"/>
+ <antcall target="test-compile"/>
+ <echo message="Building with package ${pkg-name}"/>
+ <jar destfile="${env.APS_HOME}/build/module/archive/${server}.jar"
+ basedir="${env.APS_HOME}/build/module/classes"
+ includes="${pkg-name}/**">
+ <metainf dir="${pkg-name}"
+ includes="*.xml"/>
+ </jar>
+ </target>
+
+ <target name="test-deploy" depends="test-build">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <basename file="${server}" property="port" suffix="EJB"/>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="true">
+ <arg line="deploy --port ${admin.port} --user ${admin.user} --passwordfile ${admin.password.file} ${env.APS_HOME}/build/module/archive/${server}.jar"/>
+ </exec>
+ </target>
+
+ <target name="test-undeploy">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <basename file="${server}" property="port" suffix="EJB"/>
+ <exec executable="${env.S1AS_HOME}/bin/asadmin" failonerror="true">
+ <arg line="undeploy --port ${admin.port} --user ${admin.user} --passwordfile ${admin.password.file} ${server}"/>
+ </exec>
+ </target>
+
+ <target name="test-prepare-client">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <basename file="${server}" property="port" suffix="EJB"/>
+ <antcall target="clean"/>
+ <mkdir dir="${env.APS_HOME}/build/module/classes"/>
+ <echo message="Create appclient jar file"/>
+ <exec executable="${env.S1AS_HOME}/bin/wsimport">
+ <arg line="-keep -d ${env.APS_HOME}/build/module/classes localwsdl/${server}Service.wsdl"/>
+ </exec>
+ <antcall target="compile-client"/>
+ <antcall target="unjar-client-utils"/>
+ <jar destfile="${env.APS_HOME}/build/module/archive/HelloAppClient.jar">
+ <fileset dir="${env.APS_HOME}/build/module/classes"/>
+ <fileset dir="." includes="localwsdl/**"/>
+ <manifest>
+ <attribute name="Main-Class" value="client.Client"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="test-run">
+ <basename file="${src-name}" property="server" suffix=".java"/>
+ <basename file="${server}" property="port" suffix="EJB"/>
+ <exec executable="${env.S1AS_HOME}/bin/appclient">
+ <arg line="-client ${env.APS_HOME}/build/module/archive/HelloAppClient.jar FAILURE ejb-ssl-cacert-no-certificate-test"/>
+ </exec>
+ <antcall target="runclient-invalid-secure">
+ <param name="appname" value="Hello"/>
+ <param name="appclient.application.args"
+ value="FAILURE ejb-ssl-cacert-invalid-certificate-test"/>
+ </antcall>
+ <antcall target="runclient-secure">
+ <param name="appname" value="Hello"/>
+ <param name="appclient.application.args"
+ value="SUCCESS ejb-ssl-cacert-valid-certificate-test"/>
+ </antcall>
+ </target>
+
+ <target name="all" depends="clean, test-deploy, test-prepare-client, test-run, test-undeploy">
+ </target>
+
+ <target name="report-success">
+ <echo message="Test passed"/>
+ </target>
+
+ <target name="report-failure">
+ <echo message="Test failed"/>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/client/Client.java
new file mode 100644
index 0000000..4200a79
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/client/Client.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017, 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 client;
+
+import java.util.Map;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.BindingProvider;
+
+import endpoint.HelloImplService;
+import endpoint.HelloImpl;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static HelloImplService service;
+
+ public static void main(String[] args) {
+ boolean successExpected=true;
+ String description;
+ if (args.length>1) {
+ if (args[0].compareToIgnoreCase("Failure")==0) {
+ successExpected=false;
+ }
+ description=args[1];
+ } else {
+ successExpected = false;
+ description="webservices-ejb-rolesAllowed-annotation-negative";
+ }
+ System.out.println("Starting test " + description);
+ stat.addDescription(description);
+ Client client = new Client();
+ client.doTest(description, successExpected);
+ stat.printSummary(description);
+ }
+
+ public void doTest(String desc, boolean successExpected) {
+
+ try {
+ HelloImpl port = service.getHelloImplPort();
+
+ String ret = port.sayHello("Appserver Tester !");
+ if(ret.indexOf("WebSvcTest-Hello") == -1) {
+ System.out.println("Unexpected greeting " + ret);
+ stat.addStatus(desc, stat.FAIL);
+ return;
+ }
+ System.out.println("WebService said " + ret);
+ if (successExpected) {
+ stat.addStatus(desc, stat.PASS);
+ } else {
+ System.out.println("Was expected failure, go an answer...");
+ stat.addStatus(desc, stat.FAIL);
+ }
+ } catch(Throwable t) {
+ if (successExpected) {
+ System.out.println("method invocation failed - TEST FAILED");
+ stat.addStatus(desc, stat.FAIL);
+ } else {
+ System.out.println("method invocation failed - good...");
+ stat.addStatus(desc, stat.PASS);
+ }
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/HelloImpl.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/HelloImpl.java
new file mode 100644
index 0000000..a7392d1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/HelloImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService
+@Stateless
+public class HelloImpl {
+
+ public String sayHello(String who) {
+ return "WebSvcTest-Hello " + who;
+ }
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/sun-ejb-jar.xml
new file mode 100644
index 0000000..4a1831f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb3_ssl_cacert/endpoint/sun-ejb-jar.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>HelloImpl</ejb-name>
+ <webservice-endpoint>
+ <port-component-name>HelloImpl</port-component-name>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ <login-config>
+ <auth-method>CLIENT-CERT</auth-method>
+ </login-config>
+ </webservice-endpoint>
+ </ejb>
+ <webservice-description>
+ <webservice-description-name>HelloImplService</webservice-description-name>
+ <wsdl-publish-location>file:localwsdl</wsdl-publish-location>
+ </webservice-description>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.properties b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.properties
new file mode 100755
index 0000000..ff68a20
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.properties
@@ -0,0 +1,45 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="ws"/>
+<property name="appname" value="${module}-ejbtaxcal"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<!--property name="sun-application.xml" value="descriptor/sun-application.xml"/-->
+<property name="ejb-jar.xml" value="descriptor/ejb/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/ejb/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/client/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/client/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
+<property name="wsdl-file" value="wsdl/TaxCalEjbService.wsdl"/>
+<property name="client-mapping.xml" value="TaxCalClientMapping.xml"/>
+<property name="ejb-mapping.xml" value="TaxCalMapping.xml"/>
+<property name="webservices.xml" value="descriptor/ejb/webservices.xml"/>
+<property name="wsdlfile.location" value="wsdl"/>
+
+<!--- servlet based endpoint params -->
+<!--property name="mappingfile.location" value=""/-->
+<property name="wsdlfile.name" value="TaxCalculator.wsdl"/>
+<property name="wsdlfile.location" value="wsdl"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.xml
new file mode 100755
index 0000000..8067c24
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/build.xml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonSecurity SYSTEM "file:./../common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="EjbBasedWebService" default="usage" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonSecurity;
+ &testproperties;
+
+ <target name="all"
+ depends="clean, build, deploy, run, undeploy"/>
+ <target name="run-test" depends="clean, build, deploy, run, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="compile" depends="init-common,clean-common, generate-artifacts">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ </target>
+
+ <target name="generate-artifacts">
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${ejb-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-ejb.xml"/>
+ </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${client-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-client.xml"/>
+ </antcall>
+ </target>
+ <target name="ws-package-appclientjar-common">
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${appclient.jar}" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${application-client.xml}"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"/>
+ <copy file="${sun-application-client.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/>
+ <copy file="${wsdl-file}"
+ tofile="${build.classes.dir}/META-INF/${wsdl-file}"/>
+ <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
+ update="true" includes="${appclientjar.classes}"
+ manifest="./client/MANIFEST.MF">
+
+ <fileset dir="${build.classes.dir}" includes="${client-mapping.xml}"/>
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="application-client.xml"/>
+ <include name="sun-application-client.xml"/>
+ <include name="${wsdl-file}"/>
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
+ </target>
+
+ <target name="ws-package-ejb-jar-common" depends="init-common">
+ <mkdir dir="${assemble.dir}"/>
+ <delete file="${ejb.jar}" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/ejb-jar.xml"/>
+ <copy file="${sun-ejb-jar.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"/>
+ <copy file="${webservices.xml}"
+ tofile="${build.classes.dir}/META-INF/webservices.xml"/>
+ <copy file="${sun-cmp-mappings.xml}"
+ tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml"
+ failonerror="false"/>
+ <copy file="${wsdl-file}"
+ tofile="${build.classes.dir}/META-INF/${wsdl-file}"
+ failonerror="false"/>
+ <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/>
+ <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
+ includes ="${ejbjar.classes}">
+
+ <fileset dir="${build.classes.dir}" includes="${ejb-mapping.xml}"/>
+ <metainf dir="${build.classes.dir}/META-INF">
+ <include name="ejb-jar.xml"/>
+ <include name="sun-ejb-jar.xml"/>
+ <include name="sun-cmp-mappings.xml"/>
+ <include name="webservices.xml"/>
+ <include name="${wsdl-file}"/>
+ <!--<include name="${dbschema}"/>-->
+ </metainf>
+ </jar>
+ <delete dir="${build.classes.dir}/META-INF"
+ failonerror="false"/>
+ </target>
+
+ <target name="build" depends="init-common,compile">
+ <antcall target="ws-package-ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="com/sun/s1peqe/webservices/ejb/taxcal/*.class" />
+ <param name="ejbjar.files" value="${build.classes.dir}"/>
+ <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+ <antcall target="ws-package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="com/sun/s1peqe/webservices/ejb/taxcal/client/*.class" />
+ <param name="appclientjar.files"
+ value="${build.classes.dir}"/>
+ <param name="appclient.jar"
+ value="${assemble.dir}/${appname}-client.jar"/>
+ </antcall>
+
+ <antcall target="ear-common"/>
+ </target>
+
+ <target name="deploy"
+ depends="init-common, reconfig-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+
+ <target name="run" depends="init-common">
+ <property name="statetax-ejb-endpoint-url"
+ value="https://${http.host}:${https.port}/statetaxejb"/>
+ <property name="fedtax-ejb-endpoint-url"
+ value="https://${http.host}:${https.port}/fedtaxejb"/>
+
+ <echo message="property statetax-ejb-endpoint-url is set to: ${statetax-ejb-endpoint-url}"/>
+ <echo message="property fedtax-ejb-endpoint-url is set to: ${fedtax-ejb-endpoint-url}"/>
+
+ <antcall target="runclient-secure">
+ <param name="appclient.application.args"
+ value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url} True True"/>
+ </antcall>
+ <antcall target="runclient-invalid-secure">
+ <param name="appclient.application.args"
+ value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url} False True"/>
+ </antcall>
+ <antcall target="runclient-common">
+ <param name="appclient.application.args"
+ value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url} False False"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="usage">
+ <antcall target="usage-common"/>
+ </target>
+
+ <!--
+ =======================================================
+ User Defined specific targets
+ =======================================================
+ -->
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/MANIFEST.MF
new file mode 100644
index 0000000..65b3bd4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/TaxCalClient.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/TaxCalClient.java
new file mode 100755
index 0000000..350e156
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/client/TaxCalClient.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2003, 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.s1peqe.webservices.ejb.taxcal.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+
+
+public class TaxCalClient {
+
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "TaxCalEjbbasedWS";
+ private static String testCase = null;
+ private static TaxCalEjbService taxCalService = null;
+
+ public static void main(String[] args) {
+
+ boolean stateTaxIntendedResult=true;
+ boolean fedTaxIntendedResult=true;
+
+ if(args[0] == null || args[1] == null){
+ System.out.println("TaxCal client: Argument missing. Please provide target" +
+ "endpoint address as argument");
+ System.exit(1);
+ } else {
+ stateTaxEndpoint = args[0];
+ fedTaxEndpoint = args[1];
+ if (args.length>2) {
+ stateTaxIntendedResult = (new Boolean(args[2])).booleanValue();
+ fedTaxIntendedResult = (new Boolean(args[3])).booleanValue();
+ }
+ }
+
+ stat.addDescription("This is to test ejb based webservice");
+ try {
+ TaxCalClient client = new TaxCalClient();
+ Context ic = new InitialContext();
+ taxCalService = (TaxCalEjbService)
+ ic.lookup("java:comp/env/service/TaxCalEjbService");
+
+ client.callStateTaxService(stateTaxIntendedResult);
+ client.callFedTaxService(fedTaxIntendedResult);
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ stat.printSummary(testSuite);
+ }
+
+ public void callStateTaxService(boolean intendedResult) {
+ double income = 85000.00;
+ double deductions = 5000.00;
+
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
+
+ try {
+
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+
+ ((Stub)taxCalIFPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
+
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from ejb based TaxCalService :" + stateTax);
+
+ if(stateTax == 24000.00 && intendedResult)
+ stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
+ else {
+ System.out.println("Call succeeded while it should have failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ }
+
+ } catch (Exception ex) {
+ if (intendedResult) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ } else {
+ System.out.println("Expected Exception caught :");
+ System.out.println(ex.getMessage());
+ ex.printStackTrace();
+ stat.addStatus(testSuite + "StateTaxPort", stat.PASS);
+ }
+ }
+ }
+
+ public void callFedTaxService(boolean intendedResult) {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
+
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
+
+ double fedTax = taxCalIFPort.getFedTax(income, deductions);
+ System.out.println("Fed tax from Ejb based TaxCalService :" + fedTax);
+
+ if(fedTax == 18000.00 && intendedResult)
+ stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
+ else {
+ System.out.println("Call succeeded while it should have failed");
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+ }
+ } catch (Exception ex) {
+ if (intendedResult) {
+ System.out.println("TaxCalEjbWebService client failed");
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ } else {
+ System.out.println("Expected Exception caught :");
+ System.out.println(ex.getMessage());
+ stat.addStatus(testSuite + "FedTaxPort", stat.PASS);
+ }
+ }
+ }
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml
new file mode 100755
index 0000000..9df53d2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="wsdl/TaxCalEjbService.wsdl"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal.client"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml.save b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml.save
new file mode 100755
index 0000000..9df53d2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-client.xml.save
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="wsdl/TaxCalEjbService.wsdl"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal.client"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-ejb.xml
new file mode 100755
index 0000000..781ab1b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="wsdl/TaxCalEjbService.wsdl"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-sei.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-sei.xml
new file mode 100755
index 0000000..2583c19
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/config/config-sei.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalEjbService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal">
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb"/>
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb">
+ </interface>
+ </service>
+</configuration>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/application.xml
new file mode 100755
index 0000000..b1a0453
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application>
+ <display-name>TaxCalculatorApp</display-name>
+ <module>
+ <ejb>ws-ejbtaxcal-ejb.jar</ejb>
+ </module>
+ <module>
+ <java>ws-ejbtaxcal-client.jar</java>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/application-client.xml
new file mode 100755
index 0000000..e6a5aa9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/application-client.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>app client dd for taxcalculator</description>
+ <display-name>ws-ejbtaxcalClient</display-name>
+ <service-ref>
+ <description>taxcal service ref</description>
+ <service-ref-name>service/TaxCalEjbService</service-ref-name>
+ <service-interface>com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalEjbService</service-interface>
+ <wsdl-file>META-INF/wsdl/TaxCalEjbService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>TaxCalClientMapping.xml</jaxrpc-mapping-file>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/sun-application-client.xml
new file mode 100755
index 0000000..cd48c1f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/client/sun-application-client.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/TaxCalEjbService</service-ref-name>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/ejb-jar.xml
new file mode 100755
index 0000000..6aa66a0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/ejb-jar.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>TaxCalEjb</display-name>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <service-endpoint>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF</service-endpoint>
+ <ejb-class>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ <session>
+ <display-name>TaxCalEjb</display-name>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <service-endpoint>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF</service-endpoint>
+ <ejb-class>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <use-caller-identity/>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ <container-transaction>
+ <method>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/sun-ejb-jar.xml
new file mode 100755
index 0000000..fffddc9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/sun-ejb-jar.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <name>ws-taxcal-ejb.jar</name>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>StateTaxEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>StateTaxIFPort</port-component-name>
+ <endpoint-address-uri>statetaxejb</endpoint-address-uri>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ <login-config>
+ <auth-method>CLIENT-CERT</auth-method>
+ </login-config>
+ </webservice-endpoint>
+ </ejb>
+ <ejb>
+ <ejb-name>FedTaxEjb</ejb-name>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>FedTaxIFPort</port-component-name>
+ <endpoint-address-uri>fedtaxejb</endpoint-address-uri>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/webservices.xml
new file mode 100755
index 0000000..3b66b4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/ejb/webservices.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>TaxcalculatorEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/TaxCalEjbService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>TaxCalMapping.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>StateTaxIFPort</port-component-name>
+ <wsdl-port xmlns:taxns="http://tax.org/wsdl">taxns:StateTaxIFPort
+ </wsdl-port>
+ <service-endpoint-interface>com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>StateTaxEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>FedTaxIFPort</port-component-name>
+ <wsdl-port xmlns:taxns="http://tax.org/wsdl">taxns:FedTaxIFPort
+ </wsdl-port>
+ <service-endpoint-interface>com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>FedTaxEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/sun-application.xml b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/sun-application.xml
new file mode 100755
index 0000000..19eecca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/descriptor/sun-application.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-1.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application>
+ <unique-id>0</unique-id>
+ <security-role-mapping>
+ <role-name>users</role-name>
+ <principal-name>dilbert</principal-name>
+ <principal-name>
+ CN=Dilbert, OU=Comic Division, O=Sun Solarsystems Inc, C=US
+ </principal-name>
+ </security-role-mapping>
+</sun-application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxEjb.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxEjb.java
new file mode 100755
index 0000000..36ff3b0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxEjb.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 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.s1peqe.webservices.ejb.taxcal;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class FedTaxEjb implements SessionBean {
+
+ private SessionContext sc;
+
+ public FedTaxEjb(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In FedTaxEjb::ejbCreate !!");
+ }
+
+ public double getFedTax(double income, double deductions) {
+ return ((income - deductions) * 0.2);
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxIF.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxIF.java
new file mode 100755
index 0000000..e4c1322
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/FedTaxIF.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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.s1peqe.webservices.ejb.taxcal;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+
+
+public interface FedTaxIF extends Remote{
+
+ public double getFedTax(double income, double deductions) throws RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxEjb.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxEjb.java
new file mode 100755
index 0000000..293abc0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxEjb.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002, 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.s1peqe.webservices.ejb.taxcal;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+
+public class StateTaxEjb implements SessionBean {
+
+ private SessionContext sc;
+
+ public StateTaxEjb(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In StateTaxEjb::ejbCreate !!");
+ }
+
+ public double getStateTax(double income, double deductions) {
+ return ((income - deductions) * 0.3);
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxIF.java b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxIF.java
new file mode 100755
index 0000000..3e87a23
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/ejb/StateTaxIF.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, 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.s1peqe.webservices.ejb.taxcal;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+
+
+public interface StateTaxIF extends Remote{
+
+ public double getStateTax(double income, double deductions) throws RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/wsdl/TaxCalEjbService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/wsdl/TaxCalEjbService.wsdl
new file mode 100755
index 0000000..62dbdf8
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/ejb_ssl_cacert/wsdl/TaxCalEjbService.wsdl
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="TaxCalEjbService" targetNamespace="http://tax.org/wsdl" xmlns:tns="http://tax.org/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types/>
+ <message name="FedTaxIF_getFedTax">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="FedTaxIF_getFedTaxResponse">
+ <part name="result" type="xsd:double"/></message>
+ <message name="StateTaxIF_getStateTax">
+ <part name="double_1" type="xsd:double"/>
+ <part name="double_2" type="xsd:double"/></message>
+ <message name="StateTaxIF_getStateTaxResponse">
+ <part name="result" type="xsd:double"/></message>
+ <portType name="FedTaxIF">
+ <operation name="getFedTax" parameterOrder="double_1 double_2">
+ <input message="tns:FedTaxIF_getFedTax"/>
+ <output message="tns:FedTaxIF_getFedTaxResponse"/></operation></portType>
+ <portType name="StateTaxIF">
+ <operation name="getStateTax" parameterOrder="double_1 double_2">
+ <input message="tns:StateTaxIF_getStateTax"/>
+ <output message="tns:StateTaxIF_getStateTaxResponse"/></operation></portType>
+ <binding name="FedTaxIFBinding" type="tns:FedTaxIF">
+ <operation name="getFedTax">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <binding name="StateTaxIFBinding" type="tns:StateTaxIF">
+ <operation name="getStateTax">
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://tax.org/wsdl"/></output>
+ <soap:operation soapAction=""/></operation>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
+ <service name="TaxCalEjbService">
+ <port name="FedTaxIFPort" binding="tns:FedTaxIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port>
+ <port name="StateTaxIFPort" binding="tns:StateTaxIFBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/report.xml b/appserver/tests/appserv-tests/devtests/webservice/security/report.xml
new file mode 100644
index 0000000..65a32ae
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/report.xml
@@ -0,0 +1,40 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<property name="stylesheet" value="${env.APS_HOME}/config/j2eeReporter.xsl" />
+<property name="xmlfile" value="${env.APS_HOME}/test_resultsValid.xml" />
+<property name="htmlfile" value="${env.APS_HOME}/test_results.html" />
+
+<target name="report">
+<echo message="Comparing results with expected results"/>
+
+
+ <xslt style="${stylesheet}"
+ in="${xmlfile}" out="${htmlfile}"
+ basedir="." destdir="." />
+ <antcall target="report-sh"/>
+ <!--
+ <ant dir="${env.APS_HOME}/util/filediff" target="modifyReport"/>
+ -->
+</target>
+
+<target name="report-sh">
+ <exec executable="sh">
+ <arg value="./resultCount.sh"/>
+ </exec>
+</target>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/security/resultCount.sh b/appserver/tests/appserv-tests/devtests/webservice/security/resultCount.sh
new file mode 100644
index 0000000..8af93fc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/security/resultCount.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 2017, 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
+#
+
+FILE=$APS_HOME/test_resultsValid.xml
+echo "input file=$FILE"
+
+TOTAL=6
+PASSED=`grep "pass" $FILE | wc -l`
+FAILED=`grep "fail" $FILE | wc -l`
+TOTAL_RUN=`expr $PASSED + $FAILED `
+DNR=`expr $TOTAL - $TOTAL_RUN `
+
+echo ""
+echo "************************"
+echo "PASSED= $PASSED"
+echo "------------ ========="
+echo "FAILED= $FAILED"
+echo "------------ ========="
+echo "DID NOT RUN= $DNR"
+echo "------------ ========="
+echo "Total Expected=$TOTAL"
+echo "************************"
+echo ""
+
+echo "************************">>$APS_HOME/devtests/webservice/count.txt;
+date>>$APS_HOME/devtests/webservice/count.txt;
+echo "-----------------------">>$APS_HOME/devtests/webservice/count.txt;
+echo "PASSED= $PASSED">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "FAILED= $FAILED">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "DID NOT RUN= $DNR">>$APS_HOME/devtests/webservice/count.txt;
+echo "------------ =========">>$APS_HOME/devtests/webservice/count.txt;
+echo "Total Expected=$TOTAL">>$APS_HOME/devtests/webservice/count.txt;
+echo "************************">>$APS_HOME/devtests/webservice/count.txt;
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.properties b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.properties
new file mode 100644
index 0000000..e2ea498
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="simpleservlethandler"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.xml
new file mode 100644
index 0000000..4ebd0f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/build.xml
@@ -0,0 +1,109 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Simple Soap fault test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+
+ <target name="all" depends="clean, assemble, deploy, run, undeploy"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="servlet"/>
+ </antcall>
+ </target>
+
+ <target name="gen-servlet-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/SimpleHandlerMapping_servlet.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/WEB-INF/wsdl config-interface.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile, gen-servlet-wsdl">
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="mappingfile.location" value="${build.classes.dir}"/>
+ <param name="mappingfile.name" value="SimpleHandlerMapping_servlet.xml"/>
+ <param name="wsdlfile.location" value="${build.classes.dir}/WEB-INF/wsdl"/>
+ <param name="wsdlfile.name" value="SimpleHandlerServlet.wsdl"/>
+ <param name="webwar.classes" value="servlet/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="assemble-web, assemble-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <copy file="${build.classes.dir}/WEB-INF/wsdl/SimpleHandlerServlet.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="SimpleHandlerMapping_servlet.xml,META-INF/wsdl/**,simplehandler/**,servlet/SimpleServer.class,com/**" />
+ </antcall>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/ServletHandlerTest/ServletHandlerTest"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="ServletHandlerTest"/>
+ </antcall>
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/Client.java
new file mode 100644
index 0000000..3f79920
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/Client.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002, 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 simplehandler;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import servlet.*;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-simple-soapfault");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-soapfaultID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ Service testService = (Service) ic.lookup("java:comp/env/service/simplehandler");
+ SimpleServer test = (SimpleServer)
+ testService.getPort(SimpleServer.class);
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+ System.out.println("Invocation returned " + test.sayHello("jerome"));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ stat.addStatus("soapfaultsclient main", stat.FAIL);
+ System.out.println("CAUGHT UNEXPECTED EXCEPTION: " + ex.getMessage());
+ }
+
+ stat.addStatus("soapfaultsclient main", stat.PASS);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/MANIFEST.MF
new file mode 100644
index 0000000..5085a53
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: simplehandler.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/config-interface.xml
new file mode 100644
index 0000000..07e1cb0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="SimpleHandlerServlet"
+ targetNamespace="urn:HandlerTest"
+ typeNamespace="urn:HandlerTest"
+ packageName="handlertest">
+ <interface name="servlet.SimpleServer"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/application-client.xml
new file mode 100644
index 0000000..c14bb7a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/application-client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my handler app client</description>
+ <display-name>handlerClient</display-name>
+ <service-ref>
+ <description>simple handler service ref</description>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/SimpleHandlerServlet.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_servlet.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:HandlerTest">servicens:SimpleHandlerServlet</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..a4ce49f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/simplehandler</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>ejb.SimpleServer</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:HandlerTest</namespaceURI>
+ <localpart>SimpleHandlerServer</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-web.xml
new file mode 100644
index 0000000..f96bc1b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/sun-web.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_5-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>ServletHandlerTest</context-root>
+ <servlet>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <webservice-endpoint>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <debugging-enabled>true</debugging-enabled>
+ <property name="prop1" value="value1"/>
+ <property name="prop2" value="value2"/>
+ </webservice-endpoint>
+ </servlet>
+ </sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/web.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/web.xml
new file mode 100644
index 0000000..7649ec2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <servlet>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <servlet-class>servlet.ServletHandlerTestImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ServletHandlerTest</servlet-name>
+ <url-pattern>/ServletHandlerTest</url-pattern>
+ </servlet-mapping>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/webservices.xml
new file mode 100644
index 0000000..7f873e1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/descriptor/webservices.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SimpleHandlerServlet</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/SimpleHandlerServlet.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SimpleHandlerMapping_servlet.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <wsdl-port xmlns:servicens="urn:HandlerTest">servicens:SimpleServerPort</wsdl-port>
+ <service-endpoint-interface>servlet.SimpleServer</service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ServletHandlerTest</servlet-link>
+ </service-impl-bean>
+ <handler>
+ <handler-name>SimpleHandler</handler-name>
+ <handler-class>servlet.SimpleHandler</handler-class>
+ </handler>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/docroot/README b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/docroot/README
new file mode 100644
index 0000000..1ac4e4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/docroot/README
@@ -0,0 +1,2 @@
+this is a fake directory to work around the
+quicklook hardness problem.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/ServletHandlerTestImpl.java b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/ServletHandlerTestImpl.java
new file mode 100644
index 0000000..d171a73
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/ServletHandlerTestImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.rmi.*;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+public class ServletHandlerTestImpl implements SessionBean {
+ SessionContext sc;
+
+ public String sayHello(String hello) throws RemoteException {
+ return "salut " + hello;
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SimpleServer:::ejbCreate !!");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleHandler.java b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleHandler.java
new file mode 100644
index 0000000..628a251
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleHandler.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.util.Date;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.*;
+
+public class SimpleHandler extends GenericHandler {
+
+ protected HandlerInfo info = null;
+
+ public void init(HandlerInfo info) {
+ this.info = info;
+ }
+
+ public boolean handleRequest(MessageContext context) {
+ try {
+ Date startTime = new Date();
+ context.setProperty("startTime", startTime);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public boolean handleResponse(MessageContext context) {
+ try {
+ Date startTime = (Date) context.getProperty("startTime");
+ Date endTime = new Date();
+ long elapsed = endTime.getTime() - startTime.getTime();
+ System.out.println(" in handler, elapsed " + elapsed);
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ public QName[] getHeaders() {
+ return new QName[0];
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleServer.java b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleServer.java
new file mode 100644
index 0000000..dc5cf26
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/servlethandler/servlet/SimpleServer.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 servlet;
+
+import java.rmi.*;
+
+public interface SimpleServer extends Remote {
+
+ public String sayHello(String source) throws RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceServletTest.wsdl b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceServletTest.wsdl
new file mode 100644
index 0000000..c511855
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceServletTest.wsdl
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="WebServiceServletTest" targetNamespace="urn:WebServiceTest" xmlns:tns="urn:WebServiceTest" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <schema targetNamespace="urn:WebServiceTest" xmlns:tns="urn:WebServiceTest" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="ArrayOfstring">
+ <complexContent>
+ <restriction base="soap11-enc:Array">
+ <attribute ref="soap11-enc:arrayType" wsdl:arrayType="string[]"/></restriction></complexContent></complexType></schema></types>
+ <message name="WebServiceTest_doTest">
+ <part name="arrayOfString_1" type="tns:ArrayOfstring"/></message>
+ <message name="WebServiceTest_doTestResponse">
+ <part name="result" type="xsd:string"/></message>
+ <portType name="WebServiceTest">
+ <operation name="doTest" parameterOrder="arrayOfString_1">
+ <input message="tns:WebServiceTest_doTest"/>
+ <output message="tns:WebServiceTest_doTestResponse"/></operation></portType>
+ <binding name="WebServiceTestBinding" type="tns:WebServiceTest">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <operation name="doTest">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:WebServiceTest"/></input>
+ <output>
+ <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:WebServiceTest"/></output></operation></binding>
+ <service name="WebServiceServletTest">
+ <port name="WebServiceTestPort" binding="tns:WebServiceTestBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTest.java b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTest.java
new file mode 100644
index 0000000..1c74d61
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTest.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2017, 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 test.webservice;
+
+import java.rmi.*;
+
+public interface WebServiceTest extends Remote {
+
+ public String doTest(String[] params) throws RemoteException;
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTestImpl.java b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTestImpl.java
new file mode 100644
index 0000000..4ac9d8f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/shared/war/WebServiceTestImpl.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017, 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 test.webservice;
+
+import java.rmi.*;
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.server.ServletEndpointContext;
+
+public class WebServiceTestImpl implements ServiceLifecycle, WebServiceTest {
+
+ WebServiceTest delegate;
+
+ public void destroy() {
+ System.out.println("Driver servlet destroyed");
+ }
+
+ public void init(Object context) {
+ ServletEndpointContext seContext = (ServletEndpointContext) context;
+ String testClassName = seContext.getServletContext().getInitParameter("testclassname");
+ if (testClassName==null) {
+ System.out.println("Error : no delegate servlet provided for test");
+ return;
+ }
+ try {
+ Class clazz = Class.forName(testClassName);
+ if (clazz==null) {
+ System.out.println("Error : cannot load delegate " + testClassName);
+ return;
+ }
+ Object o = clazz.newInstance();
+ if (o instanceof WebServiceTest) {
+ delegate = (WebServiceTest) o;
+ } else {
+ System.out.println("Error : delegate not of type WebServiceTest");
+ }
+ } catch(ClassNotFoundException cnfe) {
+ System.out.println("Error : cannot load delegate " + testClassName);
+ } catch(InstantiationException ie) {
+ System.out.println("Error : cannot instantiate " + testClassName);
+ } catch(Exception e) {
+ System.out.println("Error : cannot load delegate " + testClassName + " " + e.getMessage());
+ }
+ }
+
+ public String doTest(String[] params) throws RemoteException {
+
+ if (delegate!=null) {
+ return delegate.doTest(params);
+ } else {
+ throw new RemoteException("No delegate for test harness");
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/shared/war/config.xml b/appserver/tests/appserv-tests/devtests/webservice/shared/war/config.xml
new file mode 100644
index 0000000..20a3d45
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/shared/war/config.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="WebServiceServletTest"
+ targetNamespace="urn:WebServiceTest"
+ typeNamespace="urn:WebServiceTest"
+ packageName="test.webservice">
+ <interface name="test.webservice.WebServiceTest"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/shared/war/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/shared/war/webservices.xml
new file mode 100644
index 0000000..3f3b49e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/shared/war/webservices.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd">
+<webservice-description>
+<webservice-description-name>WebServiceServletTest</webservice-description-name>
+<wsdl-file>WEB-INF/wsdl/WebServiceServletTest.wsdl</wsdl-file>
+<jaxrpc-mapping-file>WebServiceTestMapping.xml</jaxrpc-mapping-file>
+<port-component>
+<port-component-name>Port</port-component-name>
+<wsdl-port xmlns:tns="urn:WebServiceTest">tns:WebServiceTestPort</wsdl-port>
+<service-endpoint-interface>test.webservice.WebServiceTest</service-endpoint-interface>
+<service-impl-bean>
+<servlet-link>WebServiceTestServlet</servlet-link>
+</service-impl-bean>
+</port-component>
+</webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.properties b/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.properties
new file mode 100644
index 0000000..4ac3352
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="simplesoapfault"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.xml
new file mode 100644
index 0000000..99f16a5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/build.xml
@@ -0,0 +1,104 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="Simple Soap fault test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+<!--
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+-->
+
+ <target name="all" depends="assemble, deploy, run, undeploy"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="gen-ejb-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/SoapFaultMapping_ejb.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/META-INF/wsdl config-interface.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile, gen-ejb-wsdl">
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes" value="SoapFaultMapping_ejb.xml,META-INF/wsdl/**,soapfault/ejb/*.class"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="assemble-ejb, assemble-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="gen-ejb-wsdl"/>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="SoapFaultMapping_ejb.xml,META-INF/wsdl/**,soapfault/**,com/**" />
+ </antcall>
+ <antcall target="deploy-client-common"/>
+ <move file="${assemble.dir}/${appname}-clientClient.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/soapfault/SimpleSoapFault"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ <antcall target="undeploy-client-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/Client.java
new file mode 100644
index 0000000..6eaec1e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/Client.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2002, 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 soapfault;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.Service;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+import soapfault.ejb.*;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-simple-soapfault");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-soapfaultID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ Service testService = (Service) ic.lookup("java:comp/env/service/soapfault");
+ SimpleSoapFaultSEI test = (SimpleSoapFaultSEI)
+ testService.getPort(new QName("urn:SoapFaultTest", "SimpleSoapFaultSEIPort"),
+ SimpleSoapFaultSEI.class);
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+
+ try {
+ String ret = test.simpleMethod();
+ } catch (SimpleSoapException ex) {
+ System.out.println("CAUGHT EXPECTED EXCEPTION: FaultOne: " + ex.getReason());
+ }
+
+ stat.addStatus("soapfaultsclient main", stat.PASS);
+ } catch (Exception ex) {
+ System.out.println("soapfaults client test failed");
+ ex.printStackTrace();
+ stat.addStatus("soapfaultsclient main", stat.FAIL);
+ //System.exit(15);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/MANIFEST.MF
new file mode 100644
index 0000000..ff21673
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: soapfault.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/config-interface.xml
new file mode 100644
index 0000000..7bbdfac
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="SoapFaultService"
+ targetNamespace="urn:SoapFaultTest"
+ typeNamespace="urn:SoapFaultTest"
+ packageName="soapfault">
+ <interface name="soapfault.ejb.SimpleSoapFaultSEI"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/application-client.xml
new file mode 100644
index 0000000..a25d0ec
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/application-client.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my soapfaults app client</description>
+ <display-name>soapfaultsClient</display-name>
+ <service-ref>
+ <description>simple soapfault service ref</description>
+ <service-ref-name>service/soapfault</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>META-INF/wsdl/SoapFaultService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SoapFaultMapping_ejb.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:SoapFaultTest">servicens:SoapFaultService</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>soapfault.ejb.SimpleSoapFaultSEI</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..8bea6aa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>SimpleSoapFaultEJB</ejb-name>
+ <service-endpoint>soapfault.ejb.SimpleSoapFaultSEI</service-endpoint>
+ <ejb-class>soapfault.ejb.SimpleSoapFaultImpl</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..fc41541
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/soapfault</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>soapfault.ejb.SimpleSoapFaultSEI</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:SoapFaultTest</namespaceURI>
+ <localpart>SoapFaultService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..8f7d0ab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>SimpleSoapFaultEJB</ejb-name>
+ <jndi-name>SimpleSoapFaultEJB</jndi-name>
+ <webservice-endpoint>
+ <port-component-name>SimpleSoapFaultSEIPort</port-component-name>
+ <endpoint-address-uri>soapfault/SimpleSoapFault</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/webservices.xml
new file mode 100644
index 0000000..11c892a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SoapFaultService</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SoapFaultService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SoapFaultMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleSoapFaultSEIPort</port-component-name>
+ <wsdl-port xmlns:servicens="urn:SoapFaultTest">servicens:SimpleSoapFaultSEIPort</wsdl-port>
+ <service-endpoint-interface>soapfault.ejb.SimpleSoapFaultSEI</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SimpleSoapFaultEJB</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapException.java b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapException.java
new file mode 100644
index 0000000..b0bf170
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapException.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 soapfault.ejb;
+
+public class SimpleSoapException extends Exception {
+
+ private String reason;
+
+ public SimpleSoapException(String reason) {
+ this.reason = reason;
+ }
+
+ public String getReason() {
+ return reason;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultImpl.java b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultImpl.java
new file mode 100644
index 0000000..c55506b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultImpl.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * SimpleServerImpl.java
+ *
+ * Created on September 13, 2004, 11:24 AM
+ */
+
+package soapfault.ejb;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dochez
+ */
+public class SimpleSoapFaultImpl implements SessionBean {
+
+ SessionContext sc;
+
+ /** Creates a new instance of SimpleServerImpl */
+ public SimpleSoapFaultImpl() {
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In GoogleEJB::ejbCreate !!");
+}
+
+ public String simpleMethod()
+ throws SimpleSoapException, RemoteException {
+
+ throw new SimpleSoapException("I only raise exceptions !");
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultSEI.java b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultSEI.java
new file mode 100644
index 0000000..74df048
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/simplefault/ejb/SimpleSoapFaultSEI.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, 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 soapfault.ejb;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface SimpleSoapFaultSEI extends Remote {
+
+ public String simpleMethod() throws SimpleSoapException, RemoteException;
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.properties b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.properties
new file mode 100644
index 0000000..0ba66c2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="soapfaults"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.xml
new file mode 100644
index 0000000..d8f775c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/build.xml
@@ -0,0 +1,172 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="xsd test" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-appclient"/>
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="wscompile-ejb"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . -f:explicitcontext wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/soapfaults">
+ <fileset dir="output/soapfaults"
+ includes="TestService.class, Test.class, Test1RequestType.class, Test2RequestType.class, Test1ResponseType.class, FaultOne.class, FaultTwo.class, FaultThree.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . -f:explicitcontext wscompile_config_ejb.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/soapfaultsejb">
+ <fileset dir="output/soapfaultsejb"
+ includes="TestService.class, Test.class, Test1RequestType.class, Test2RequestType.class, Test1ResponseType.class, FaultOne.class, FaultTwo.class, FaultThree.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="soapfaults.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="mapping_appclient.xml"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="mapping_appclient.xml,META-INF/wsdl/**,soapfaults/*.class" />
+
+ </antcall>
+ <copy todir="${build.classes.dir}"
+ file="mapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="mapping_ejb.xml,META-INF/wsdl/**,soapfaultsejb/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="out"/>
+ <delete dir="output"/>
+ <delete dir="soapfaults"/>
+ <delete dir="soapfaultsejb"/>
+ <delete file="mapping.xml"/>
+ <delete file="mapping_ejb.xml"/>
+ <delete file="mapping_appclient.xml"/>
+ <delete file="jaxrpc.log"/>
+ <delete file="good.debugModel.txt"/>
+ <delete file="bad.debugModel.txt"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/soapfaultsejb/SoapFaultsTest"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="gen-mapping-appclient" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -cp . -mapping mapping_appclient.xml -f:explicitcontext wscompile_config_appclient.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -cp . -mapping mapping_ejb.xml -f:explicitcontext wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="mapping" depends="init-common">
+ <delete dir="out"/>
+ <mkdir dir="out"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -cp . -keep -d out -Xprintstacktrace -Xdebugmodel:good.debugModel.txt -mapping mapping.xml -f:explicitcontext wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="genall" depends="init-common, mapping">
+ <delete dir="out"/>
+ <mkdir dir="out"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen:both -cp . -keep -d out -Xprintstacktrace -Xdebugmodel:bad.debugModel.txt -f:explicitcontext config.xml"/>
+ </antcall>
+ </target>
+
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/Client.java
new file mode 100644
index 0000000..54633c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/Client.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2002, 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 soapfaults;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-soapfaults");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-soapfaultsID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ TestService testService =
+ (TestService) ic.lookup("java:comp/env/service/soapfaults");
+ Test test = testService.getTestPort();
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+
+ Test2RequestType c = new Test2RequestType("recess", "weekender");
+
+ try {
+ Test1ResponseType ret = test.test1("1", "test fault one", c);
+ } catch (FaultOne ex) {
+ System.out.println("CAUGHT EXPECTED EXCEPTION: FaultOne: " + ex.getMessage1());
+ }
+
+ try {
+ Test1ResponseType ret = test.test1("2", "test fault two", c);
+ } catch (FaultTwo ex) {
+ System.out.println("CAUGHT EXPECTED EXCEPTION: FaultTwo: " + ex.getMessage2());
+ }
+
+ try {
+ Test1ResponseType ret = test.test1("3", "test fault three", c);
+ } catch (FaultThree ex) {
+ System.out.println("CAUGHT EXPECTED EXCEPTION: FaultThree: " + ex.getMessage3());
+ }
+
+ stat.addStatus("soapfaultsclient main", stat.PASS);
+ } catch (Exception ex) {
+ System.out.println("soapfaults client test failed");
+ ex.printStackTrace();
+ stat.addStatus("soapfaultsclient main", stat.FAIL);
+ //System.exit(15);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/MANIFEST.MF
new file mode 100644
index 0000000..6eea9a6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: soapfaults.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/config.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/config.xml
new file mode 100644
index 0000000..b8e05e2
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="mapping.xml"
+ wsdlLocation="soapfaults.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application-client.xml
new file mode 100644
index 0000000..05d466c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my soapfaults app client</description>
+ <display-name>soapfaultsClient</display-name>
+ <service-ref>
+ <description>soapfaults service ref</description>
+ <service-ref-name>service/soapfaults</service-ref-name>
+ <service-interface>soapfaults.TestService</service-interface>
+ <wsdl-file>META-INF/wsdl/soapfaults.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>mapping_appclient.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:test">servicens:TestService
+ </service-qname>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application.xml
new file mode 100644
index 0000000..33626f9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>App</display-name>
+ <module>
+ <java>soapfaults-client.jar</java>
+ </module>
+ <module>
+ <ejb>soapfaults-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..a93c3c0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>SoapFaultsEjb</ejb-name>
+ <service-endpoint>soapfaultsejb.Test</service-endpoint>
+ <ejb-class>soapfaultsejb.SoapFaultsEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>SoapFaultsEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..0dc6db9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/soapfaults</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>soapfaults.Test</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:TestService</namespaceURI>
+ <localpart>TestService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..3d93db3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>SoapFaultsEjb</ejb-name>
+ <jndi-name>SoapFaultsEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>TestPort</port-component-name>
+ <endpoint-address-uri>soapfaultsejb/SoapFaultsTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/webservices.xml
new file mode 100644
index 0000000..e74d8dc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SoapFaultsWebServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/soapfaults.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>mapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>TestPort</port-component-name>
+ <wsdl-port xmlns:myns="urn:test">myns:TestPort</wsdl-port>
+ <service-endpoint-interface>soapfaultsejb.Test</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SoapFaultsEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/ejb/SoapFaultsEJB.java b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/ejb/SoapFaultsEJB.java
new file mode 100644
index 0000000..0a693cd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/ejb/SoapFaultsEJB.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2002, 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 soapfaultsejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+import javax.xml.rpc.handler.MessageContext;
+
+public class SoapFaultsEJB implements SessionBean {
+ private SessionContext sc;
+
+ public SoapFaultsEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In SoapFaultsEJB::ejbCreate !!");
+ }
+
+ public Test1ResponseType test1(String a, String b,
+ Test2RequestType c)
+ throws FaultOne, FaultThree, FaultTwo, java.rmi.RemoteException
+ {
+ MessageContext msgContext = sc.getMessageContext();
+ System.out.println("msgContext = " + msgContext);
+
+ System.out.println("SoapFaultsEJB.test1() called with ");
+ System.out.println("a = " + a);
+ System.out.println("b = " + b);
+
+ System.out.println("Test2RequestType.a = " + c.getTest2RequestParamA());
+ System.out.println("Test2RequestType.b = " + c.getTest2RequestParamB());
+
+ if ("1".equals(a)) {
+ System.out.println("SoapFaultsEJB... throwing FaultOne Exception");
+ throw new FaultOne("1", "I need a life.");
+ }
+
+ if ("2".equals(a)) {
+ System.out.println("SoapFaultsEJB... throwing FaultTwo Exception");
+ throw new FaultTwo("2", "I am so tired");
+ }
+
+ if ("3".equals(a)) {
+ System.out.println("SoapFaultsEJB... throwing FaultThree Exception");
+ throw new FaultThree("3", "I love fortune cookies");
+ }
+
+ Test1ResponseType t = new Test1ResponseType(1,2);
+ return t;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/soapfaults.wsdl b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/soapfaults.wsdl
new file mode 100644
index 0000000..8ad5e8a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/soapfaults.wsdl
@@ -0,0 +1,139 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="HelloTest"
+ targetNamespace="urn:test"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ttns="urn:test:types"
+ xmlns:tns="urn:test">
+
+ <types>
+ <xsd:schema targetNamespace="urn:test:types">
+
+ <xsd:element name="Test1Request" type="ttns:Test1RequestType"/>
+ <xsd:complexType name="Test1RequestType">
+ <xsd:sequence>
+ <xsd:element name="test1RequestParamA" type="xsd:string"/>
+ <xsd:element name="test1RequestParamB" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="Test2Request" type="ttns:Test2RequestType"/>
+ <xsd:complexType name="Test2RequestType">
+ <xsd:sequence>
+ <xsd:element name="test2RequestParamA" type="xsd:string"/>
+ <xsd:element name="test2RequestParamB" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="Test1Response" type="ttns:Test1ResponseType"/>
+ <xsd:complexType name="Test1ResponseType">
+ <xsd:sequence>
+ <xsd:element name="test1ResponseParamA" type="xsd:int"/>
+ <xsd:element name="test1ResponseParamB" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="FaultOneReason" type="ttns:FaultOne"/>
+ <xsd:complexType name="FaultOne">
+ <xsd:sequence>
+ <xsd:element name="messageID1" type="xsd:string"/>
+ <xsd:element name="message1" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="FaultTwoReason" type="ttns:FaultTwo"/>
+ <xsd:complexType name="FaultTwo">
+ <xsd:sequence>
+ <xsd:element name="messageID2" type="xsd:string"/>
+ <xsd:element name="message2" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="FaultThreeReason" type="ttns:FaultThree"/>
+ <xsd:complexType name="FaultThree">
+ <xsd:sequence>
+ <xsd:element name="messageID3" type="xsd:string"/>
+ <xsd:element name="message3" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+
+ </types>
+
+ <message name="Test1Request">
+ <part name="params1" element="ttns:Test1Request"/>
+ </message>
+
+ <message name="Test2Request">
+ <part name="params2" element="ttns:Test2Request"/>
+ </message>
+
+ <message name="Test1Response">
+ <part name="result" element="ttns:Test1Response"/>
+ </message>
+
+ <message name="FaultOne">
+ <part name="reason1" element="ttns:FaultOneReason"/>
+ <part name="reason3" element="ttns:FaultThreeReason"/>
+ </message>
+
+ <message name="FaultTwo">
+ <part name="reason" element="ttns:FaultTwoReason"/>
+ </message>
+
+
+ <portType name="Test">
+ <operation name="test1">
+ <input message="tns:Test1Request"/>
+ <output message="tns:Test1Response"/>
+ <fault name="FaultTwo" message="tns:FaultTwo"/>
+ </operation>
+ </portType>
+
+ <binding name="TestBinding" type="tns:Test">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" part="params1"/>
+ <soap:header message="tns:Test2Request" part="params2" use="literal">
+ <soap:headerfault message="tns:FaultOne" part="reason1" use="literal"/>
+ <soap:headerfault message="tns:FaultOne" part="reason3" use="literal"/>
+ </soap:header>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="FaultTwo">
+ <soap:fault name="FaultTwo" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+
+ <service name="TestService">
+ <port name="TestPort" binding="tns:TestBinding">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ </service>
+
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_appclient.xml
new file mode 100644
index 0000000..38d7aaa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="soapfaults.wsdl"
+ packageName="soapfaults"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_ejb.xml
new file mode 100644
index 0000000..6150951
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/soapfaults/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="soapfaults.wsdl"
+ packageName="soapfaultsejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.properties b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.properties
new file mode 100644
index 0000000..46c880f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.properties
@@ -0,0 +1,40 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="stubproperties"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client" value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="web.xml" value="descriptor/web.xml"/>
+<property name="ejbjar.files" value="${build.classes.dir}"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="webservices.xml" value="webservices.xml"/>
+<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="sun-application.xml"
+ value="descriptor/sun-application.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.xml
new file mode 100644
index 0000000..24a165c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/build.xml
@@ -0,0 +1,148 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="JAXRPC Stub Properties test" default="all" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+<!-- NOTE. the simple mapping test and full mapping test can
+ only be run one at a time, I didn't want to set up two
+ tests for this. -->
+<!--
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+-->
+
+ <target name="all" depends="assemble, deploy, run, undeploy"/>
+
+ <target name="compile" depends="compile-web">
+ <antcall target="compile-common">
+ <param name="src" value="stubprops"/>
+ </antcall>
+ </target>
+
+ <target name="gen-ejb-wsdl" depends="init-common">
+ <mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/SayHelloMapping_ejb.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir}/META-INF/wsdl config-interface.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-ejb" depends="init-common, compile, gen-ejb-wsdl">
+ <mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/>
+ <copy todir="${build.classes.dir}/WEB-INF/wsdl"
+ file="${build.classes.dir}/META-INF/wsdl/SayHelloService.wsdl"/>
+ <copy todir="." file="descriptor/webservices.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes" value="SayHelloMapping_ejb.xml,META-INF/wsdl/**,stubprops/Simple*.class"/>
+ </antcall>
+ <delete file="webservices.xml"/>
+ </target>
+
+
+ <target name="assemble-web" depends="init-common, compile, gen-web-wsdl">
+ <copy todir="." file="../shared/war/webservices.xml"/>
+ <copy todir="${build.classes.dir}/WEB-INF" file="${sun-web.xml}"/>
+ <replace file="${build.classes.dir}/WEB-INF/sun-web.xml" token="@webHost@" value="${http.host}"/>
+ <replace file="${build.classes.dir}/WEB-INF/sun-web.xml" token="@webPort@" value="${http.port}"/>
+ <antcall target="webclient-war-common">
+ <param name="hasWebclient" value="yes"/>
+ <param name="sun-web.xml" value="${build.classes.dir}/WEB-INF/sun-web.xml"/>
+ <param name="mappingfile.location" value="${build.classes.dir}"/>
+ <param name="mappingfile.name" value="WebServiceTestMapping.xml"/>
+ <param name="wsdlfile.location" value="${build.classes.dir}"/>
+ <param name="wsdlfile.name" value="WebServiceServletTest.wsdl"/>
+ <param name="webwar.classes" value="SayHelloMapping_ejb.xml,WebServiceTestMapping.xml,WEB-INF/wsdl/**,stubprops/TestServlet.class, test/*.class"/>
+ </antcall>
+ <jar jarfile="${assemble.dir}/${appname}-web.war" update="true">
+ <fileset dir="${build.classes.dir}" casesensitive="yes">
+ <include name="WEB-INF/wsdl/SayHelloService.wsdl"/>
+ <include name="SayHelloMapping_ejb.xml"/>
+ </fileset>
+ </jar>
+ <delete file="webservices.xml"/>
+ </target>
+
+ <target name="compile-web" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="../shared/war"/>
+ </antcall>
+ </target>
+
+ <target name="gen-web-wsdl" depends="init-common">
+ <!--<mkdir dir="${build.classes.dir}/WEB-INF/wsdl"/> -->
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-define -mapping ${build.classes.dir}/WebServiceTestMapping.xml -cp ${build.classes.dir} -keep -d ${build.classes.dir} ../shared/war/config.xml"/>
+ </antcall>
+ </target>
+
+ <target name="assemble" depends="assemble-ejb, assemble-web, assemble-client"/>
+
+ <target name="assemble-client" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <unjar src="${env.APS_HOME}/lib/reporter.jar"
+ dest="${build.classes.dir}"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="Client.class, test/**,com/**" />
+ </antcall>
+ <move file="${assemble.dir}/${appname}-client.jar" toFile="${assemble.dir}/${appname}AppClient.jar"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/WebServiceTestServlet/WebServiceTestService"/>
+ </antcall>
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-jar-common"/>
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="WebServiceTestServlet"/>
+ </antcall>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/Client.java
new file mode 100644
index 0000000..0429160
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/Client.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2002, 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
+ */
+
+import java.net.URL;
+import javax.xml.rpc.ServiceFactory;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Call;
+import javax.xml.namespace.QName;
+
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import test.webservice.WebServiceTest;
+
+/**
+ *
+ * @author dochez
+ */
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main(String[] args) {
+ stat.addDescription("webservices-web-stubs-properties");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-web-stubs-properties");
+ }
+
+ public void doTest(String[] args) {
+ try {
+ dynamic(args);
+ stat.addStatus("web-stubs-properties Dynamic Proxy", stat.PASS);
+ } catch(Exception e) {
+ System.out.println("Failure " + e.getMessage());
+ e.printStackTrace();
+ stat.addStatus("web-stubs-properties Dynamic Proxy", stat.FAIL);
+ }
+ }
+
+ public void dynamic(String[] args) throws Exception {
+ String endpoint = args[0];
+ System.out.println("Invoking dynamic proxies with endpoint at " + endpoint);
+ URL wsdlURL = new URL(endpoint+"?WSDL");
+ ServiceFactory factory = ServiceFactory.newInstance();
+ Service service = factory.createService(wsdlURL,
+ new QName("urn:WebServiceTest","WebServiceServletTest"));
+ System.out.println("Obtained Service");
+ WebServiceTest intf = (WebServiceTest) service.getPort(
+ new QName("urn:WebServiceTest","WebServiceTestPort"),
+ WebServiceTest.class);
+ String[] params = new String[1];
+ params[0] = " from client";
+ System.out.println(intf.doTest(params));
+ }
+
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/MANIFEST.MF
new file mode 100644
index 0000000..cc0dbf6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: Client
\ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/config-interface.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/config-interface.xml
new file mode 100644
index 0000000..0e0b627
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/config-interface.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service
+ name="SayHelloService"
+ targetNamespace="urn:WebServiceTest"
+ typeNamespace="urn:WebServiceTest"
+ packageName="stubprops">
+ <interface name="stubprops.SimpleServer"/>
+ </service>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/application-client.xml
new file mode 100644
index 0000000..7171984
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/application-client.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my web stub properties test app client</description>
+ <display-name>WebStubProperties</display-name>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..b2bbfeb
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/ejb-jar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>SayHelloEJB</ejb-name>
+ <service-endpoint>stubprops.SimpleServer</service-endpoint>
+ <ejb-class>stubprops.SimpleServerImpl</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..901f2aa
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>SayHelloEJB</ejb-name>
+ <jndi-name>SayHelloEJB</jndi-name>
+ <webservice-endpoint>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <endpoint-address-uri>simpleserver/SimpleServer</endpoint-address-uri>
+ <debugging-enabled>true</debugging-enabled>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-web.xml
new file mode 100644
index 0000000..12f6c59
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/sun-web.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN' 'http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd'>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <context-root>WebServiceTestServlet</context-root>
+ <servlet>
+ <servlet-name>test.webservice.WebServiceTestImpl</servlet-name>
+ <webservice-endpoint>
+ <port-component-name>Port</port-component-name>
+ <debugging-enabled>true</debugging-enabled>
+ </webservice-endpoint>
+ </servlet>
+ <service-ref>
+ <service-ref-name>service/SimpleServiceReference</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>stubprops.SimpleServer</service-endpoint-interface>
+ <stub-property>
+ <name>javax.xml.rpc.service.endpoint.address</name>
+ <value>http://@webHost@:@webPort@/simpleserver/SimpleServer </value>
+ </stub-property>
+ </port-info>
+ </service-ref>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/web.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/web.xml
new file mode 100644
index 0000000..55e67ca
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <context-param>
+ <param-name>testclassname</param-name>
+ <param-value>stubprops.TestServlet</param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>test.webservice.WebServiceTestImpl</servlet-name>
+ <servlet-class>test.webservice.WebServiceTestImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>test.webservice.WebServiceTestImpl</servlet-name>
+ <url-pattern>/WebServiceTestService</url-pattern>
+ </servlet-mapping>
+ <service-ref>
+ <description>service ref for ejb endpoint</description>
+ <service-ref-name>service/SimpleServiceReference</service-ref-name>
+ <service-interface>javax.xml.rpc.Service</service-interface>
+ <wsdl-file>WEB-INF/wsdl/SayHelloService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SayHelloMapping_ejb.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:WebServiceTest">servicens:SayHelloService</service-qname>
+ <port-component-ref>
+ <service-endpoint-interface>stubprops.SimpleServer</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/webservices.xml
new file mode 100644
index 0000000..680e350
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>SayHelloService</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/SayHelloService.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>SayHelloMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>SimpleServerPort</port-component-name>
+ <wsdl-port xmlns:servicens="urn:WebServiceTest">servicens:SimpleServerPort</wsdl-port>
+ <service-endpoint-interface>stubprops.SimpleServer</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>SayHelloEJB</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/docroot/README b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/docroot/README
new file mode 100644
index 0000000..1ac4e4f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/docroot/README
@@ -0,0 +1,2 @@
+this is a fake directory to work around the
+quicklook hardness problem.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServer.java b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServer.java
new file mode 100644
index 0000000..b3c5973
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServer.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * SimpleServer.java
+ *
+ * Created on September 13, 2004, 11:23 AM
+ */
+
+package stubprops;
+
+import java.rmi.RemoteException;
+import java.rmi.Remote;
+
+/**
+ * Simple WebServices Interface
+ *
+ * @author Jerome Dochez
+ */
+public interface SimpleServer extends Remote {
+
+ public String sayHello(String who) throws RemoteException;
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServerImpl.java b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServerImpl.java
new file mode 100644
index 0000000..c003486
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/SimpleServerImpl.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * SimpleServerImpl.java
+ *
+ * Created on September 13, 2004, 11:24 AM
+ */
+
+package stubprops;
+
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import java.rmi.RemoteException;
+
+/**
+ *
+ * @author dochez
+ */
+public class SimpleServerImpl implements SessionBean {
+
+ SessionContext sc;
+
+ /** Creates a new instance of SimpleServerImpl */
+ public SimpleServerImpl() {
+ }
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In GoogleEJB::ejbCreate !!");
+}
+
+ public String sayHello(String who) throws RemoteException {
+ return "hello" + who;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/TestServlet.java b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/TestServlet.java
new file mode 100644
index 0000000..3db4899
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/webstub_properties/stubprops/TestServlet.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2017, 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
+ */
+
+/*
+ * TestServlet.java
+ *
+ * Created on September 13, 2004, 3:16 PM
+ */
+
+package stubprops;
+
+import test.webservice.WebServiceTest;
+import java.rmi.RemoteException;
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+
+
+/**
+ *
+ * @author dochez
+ */
+public class TestServlet implements WebServiceTest {
+
+ SimpleServer port;
+
+ /** Creates a new instance of TestServlet */
+ public TestServlet() {
+ System.out.println("Test servlet instantiated");
+ }
+
+ public String doTest(String[] parameters) throws RemoteException {
+
+ System.out.println("Test servlet invoked");
+ Service ref;
+ try {
+ InitialContext ic = new InitialContext();
+ ref = (Service) ic.lookup("java:comp/env/service/SimpleServiceReference");
+ } catch(javax.naming.NamingException e) {
+ e.printStackTrace();
+ return "Failed - " + e.getMessage();
+ }
+ if (ref==null) {
+ System.out.println("failure : cannot get service ref");
+ return "Failed - Cannot get ref";
+ }
+ try {
+ java.util.Iterator itr = ref.getPorts();
+ while (itr.hasNext()) {
+ System.out.println(itr.next());
+
+ }
+
+ port = (SimpleServer) ref.getPort(SimpleServer.class);
+ } catch(javax.xml.rpc.ServiceException e) {
+ e.printStackTrace();
+ System.out.println("Failed - Cannot get port");
+ return "Failed - " + e.getMessage();
+ }
+ if (port==null) {
+ System.out.println("failure : cannot get port");
+ return "Failed - Cannot get port";
+ }
+ return port.sayHello(parameters[0]);
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.properties b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.properties
new file mode 100644
index 0000000..0a40a08
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.properties
@@ -0,0 +1,23 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="service_endpoint_address"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="ejb.wsit.descriptors" value="./descriptors"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.xml b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.xml
new file mode 100644
index 0000000..ede3a10
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/build.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "./build.properties">
+]>
+
+<project name="service_endpoint_address" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup-ejb, assemble-client, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup-ejb" depends="assemble-ejb, deploy-ejb-jar"/>
+
+ <target name="assemble-ejb" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+
+ <antcall target="pkg-ejb-jar">
+ <param name="jar.classes" value="endpoint"/>
+ <param name="jar.file" value="${assemble.dir}/${appname}-ejb.jar"/>
+ </antcall>
+
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/service?WSDL"/>
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -p wls_dd.service_endpoint_address.client -d ${build.classes.dir}/client http://${http.host}:${http.port}/${appname}/service?WSDL"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-ejb-jar">
+ <antcall target="deploy-jar-common"/>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-jar-common"/>
+ </target>
+
+ <target name="runclient">
+ <antcall target="run-client">
+ <param name="client-class" value="wls_dd.service_endpoint_address.client.Client"/>
+ <param name="other-args" value="async-ejb-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/client/Client.java
new file mode 100644
index 0000000..334d7a4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 wls_dd.service_endpoint_address.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.ws.WebServiceRef;
+
+/**
+ * @author Rama Pulavarthi
+ */
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("wls_dd.service_endpoint_address");
+ Client client = new Client();
+ client.runTest();
+ stat.printSummary("wls_dd.service_endpoint_address");
+ }
+
+ public void runTest() {
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ int ret = port.addNumbers(2222, 1234);
+ if (ret != (2222 + 1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("wls_dd.service_endpoint_address", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("wls_dd.service_endpoint_address", stat.PASS);
+ } catch (Exception e) {
+ e.printStackTrace();
+ stat.addStatus("wls_dd.service_endpoint_address", stat.FAIL);
+ }
+ }
+
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/descriptors/weblogic-webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/descriptors/weblogic-webservices.xml
new file mode 100644
index 0000000..52ca8c4
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/descriptors/weblogic-webservices.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<weblogic-webservices version="1.0" xmlns="http://xmlns.oracle.com/weblogic/weblogic-webservices"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <webservice-description-name>AddNumbersImplService</webservice-description-name>
+ <webservice-type>JAXWS</webservice-type>
+ <port-component>
+ <port-component-name>AddNumbersImpl</port-component-name>
+ <service-endpoint-address>
+ <webservice-contextpath>service_endpoint_address</webservice-contextpath>
+ <webservice-serviceuri>service</webservice-serviceuri>
+ </service-endpoint-address>
+ </port-component>
+ </webservice-description>
+</weblogic-webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..e2adfb9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/service_endpoint_address/endpoint/AddNumbersImpl.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017, 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 endpoint;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+/**
+ * @author Rama Pulavarthi
+ */
+@WebService
+
+@Stateless
+public class AddNumbersImpl {
+ public int addNumbers(int n1, int n2) {
+ System.out.println ("Received add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/AddNumbersService.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/AddNumbersService.wsdl
new file mode 100644
index 0000000..8886193
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/AddNumbersService.wsdl
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.2-hudson-54-. -->
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.2-hudson-54-. -->
+<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://endpoint.wsdl_exposed_false.wls_dd/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://endpoint.wsdl_exposed_false.wls_dd/" name="AddNumbersImplService">
+<types>
+<xsd:schema>
+<xsd:import namespace="http://endpoint.wsdl_exposed_false.wls_dd/" schemaLocation="schema1.xsd"/>
+</xsd:schema>
+</types>
+<message name="addNumbers">
+<part name="parameters" element="tns:addNumbers"/>
+</message>
+<message name="addNumbersResponse">
+<part name="parameters" element="tns:addNumbersResponse"/>
+</message>
+<portType name="AddNumbersImpl">
+<operation name="addNumbers">
+<input wsam:Action="http://endpoint.wsdl_exposed_false.wls_dd/AddNumbersImpl/addNumbersRequest" message="tns:addNumbers"/>
+<output wsam:Action="http://endpoint.wsdl_exposed_false.wls_dd/AddNumbersImpl/addNumbersResponse" message="tns:addNumbersResponse"/>
+</operation>
+</portType>
+<binding name="AddNumbersImplPortBinding" type="tns:AddNumbersImpl">
+<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+<operation name="addNumbers">
+<soap:operation soapAction=""/>
+<input>
+<soap:body use="literal"/>
+</input>
+<output>
+<soap:body use="literal"/>
+</output>
+</operation>
+</binding>
+<service name="AddNumbersImplService">
+<port name="AddNumbersImplPort" binding="tns:AddNumbersImplPortBinding">
+<soap:address location="REPLACE_URL"/>
+</port>
+</service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.properties b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.properties
new file mode 100644
index 0000000..9a4e313
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.properties
@@ -0,0 +1,24 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="wsdl_exposed_false"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="web.xml" value="./web.xml"/>
+<property name="webservices.xml" value="./webservices.xml"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.xml b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.xml
new file mode 100644
index 0000000..cca584e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/build.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY commonRun SYSTEM "file:./../../../../config/run.xml">
+<!ENTITY jaxwsTools SYSTEM "file:./../../annotations/jaxwstools.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="wsdl_exposed_false" default="all" basedir=".">
+
+ &commonSetup;
+ &commonBuild;
+ &commonRun;
+ &testproperties;
+ &jaxwsTools;
+
+ <target name="all" depends="clean, setup, runclient, undeploy"/>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ </target>
+
+ <target name="setup" depends="assemble-web, deploy-app, assemble-client"/>
+
+ <target name="compile" depends="init-common">
+ <antcall target="compile-common">
+ <param name="src" value="endpoint"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-web" depends="init-common, compile">
+
+ <copy file="weblogic-webservices.xml.template" tofile="weblogic-webservices.xml"/>
+ <property name="localwsdldir" value="${build.classes.dir}/client" />
+ <replace file="${basedir}/weblogic-webservices.xml">
+ <replacefilter token="%TOKEN%" value="${localwsdldir}"/>
+ </replace>
+
+
+ <antcall target="pkg-war">
+ <param name="wsdlfile.location" value="${basedir}"/>
+ <param name="wsdlfile.name" value="AddNumbersService.wsdl"/>
+ <param name="schemafile.location" value="${basedir}"/>
+ <param name="schemafile.name" value="schema1.xsd"/>
+
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
+ </antcall>
+ </target>
+
+ <target name="assemble-client" depends="init-common">
+ <mkdir dir="${build.classes.dir}/client"/>
+ <echo message="wsimporting http://${http.host}:${http.port}/${appname}/service?WSDL"/>
+ <property name="localwsdldir" value="${build.classes.dir}/client" />
+ <antcall target="wsimport">
+ <param name="wsimport.args"
+ value="-keep -p wls_dd.${ant.project.name}.client -d ${build.classes.dir}/client ${localwsdldir}/AddNumbersService.wsdl"/>
+ </antcall>
+ <javac srcdir="." destdir="${build.classes.dir}/client"
+ classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar"
+ includes="client/**"/>
+ </target>
+
+ <target name="deploy-app">
+ <antcall target="deploy-war-common">
+ <param name="contextroot" value="${appname}"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-war-common"/>
+ </target>
+
+ <target name="runclient">
+ <!--property name="endpoint.address" value="http://${http.host}:${http.port}/${appname}/service"/-->
+ <antcall target="run-client">
+ <param name="client-class" value="wls_dd.${ant.project.name}.client.Client"/>
+ <param name="other-args" value="async-web-svc-test"/>
+ </antcall>
+ </target>
+</project>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/client/Client.java
new file mode 100644
index 0000000..0e23c52
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/client/Client.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, 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 wls_dd.wsdl_exposed_false.client;
+
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+import javax.xml.ws.WebServiceRef;
+
+/**
+ * @author Rama Pulavarthi
+ */
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ @WebServiceRef
+ static AddNumbersImplService service;
+
+ public static void main(String[] args) {
+ stat.addDescription("wls_dd.wsdl_exposed_false");
+ Client client = new Client();
+ client.runTest();
+ stat.printSummary("wls_dd.wsdl_exposed_false");
+ }
+
+ public void runTest() {
+ try {
+ AddNumbersImpl port = service.getAddNumbersImplPort();
+ int ret = port.addNumbers(2222, 1234);
+ if (ret != (2222 + 1234)) {
+ System.out.println("Unexpected add result " + ret);
+ stat.addStatus("wls_dd.wsdl_exposed_false", stat.FAIL);
+ return;
+ }
+ System.out.println(ret);
+ stat.addStatus("wls_dd.wsdl_exposed_false", stat.PASS);
+ } catch (Exception e) {
+ e.printStackTrace();
+ stat.addStatus("wls_dd.wsdl_exposed_false", stat.FAIL);
+ }
+ }
+
+
+}
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/endpoint/AddNumbersImpl.java b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/endpoint/AddNumbersImpl.java
new file mode 100644
index 0000000..a021aef
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/endpoint/AddNumbersImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, 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 wls_dd.wsdl_exposed_false.endpoint;
+
+import javax.jws.WebService;
+
+/**
+ * @author Rama Pulavarthi
+ */
+@WebService
+public class AddNumbersImpl {
+ public int addNumbers(int n1, int n2) {
+ System.out.println ("Received add request for " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/schema1.xsd b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/schema1.xsd
new file mode 100644
index 0000000..13b3cfd
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/schema1.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.2-hudson-54-. -->
+<xs:schema xmlns:tns="http://endpoint.wsdl_exposed_false.wls_dd/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://endpoint.wsdl_exposed_false.wls_dd/">
+
+<xs:element name="addNumbers" type="tns:addNumbers"/>
+
+<xs:element name="addNumbersResponse" type="tns:addNumbersResponse"/>
+
+<xs:complexType name="addNumbers">
+<xs:sequence>
+<xs:element name="arg0" type="xs:int"/>
+<xs:element name="arg1" type="xs:int"/>
+</xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="addNumbersResponse">
+<xs:sequence>
+<xs:element name="return" type="xs:int"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/web.xml b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/web.xml
new file mode 100644
index 0000000..39bd1a5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <servlet-class>wls_dd.wsdl_exposed_false.endpoint.AddNumbersImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AddNumbersImpl</servlet-name>
+ <url-pattern>/service</url-pattern>
+ </servlet-mapping>
+</web-app>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/weblogic-webservices.xml.template b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/weblogic-webservices.xml.template
new file mode 100644
index 0000000..fbda20e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/weblogic-webservices.xml.template
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+
+-->
+
+<weblogic-webservices version="1.0" xmlns="http://xmlns.oracle.com/weblogic/weblogic-webservices"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <webservice-type>JAXWS</webservice-type>
+ <wsdl-publish-file>%TOKEN%</wsdl-publish-file>
+ <port-component>
+ <port-component-name>AddNumbersImpl</port-component-name>
+ <wsdl>
+ <exposed>
+ false
+ </exposed>
+ </wsdl>
+ <validate-request>true</validate-request>
+ </port-component>
+ </webservice-description>
+</weblogic-webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/webservices.xml
new file mode 100644
index 0000000..4b28ac0
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wls_dd/wsdl_exposed_false/webservices.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.ibm.com/webservices/xsd/javaee_web_services_1_2.xsd">
+ <webservice-description>
+ <display-name>AddNumbersService</display-name>
+ <webservice-description-name>AddNumbersService</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/AddNumbersService.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>AddNumbersImpl</port-component-name>
+ <wsdl-service xmlns:wsdl-port_ns__="http://endpoint.wsdl_exposed_false.wls_dd/">wsdl-port_ns__:AddNumbersImplService</wsdl-service>
+ <wsdl-port xmlns:wsdl-port_ns__="http://endpoint.wsdl_exposed_false.wls_dd/">wsdl-port_ns__:AddNumbersImplPort</wsdl-port>
+ <service-impl-bean>
+ <servlet-link>AddNumbersImpl</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
+
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/README b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/README
new file mode 100644
index 0000000..9b8fd72
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/README
@@ -0,0 +1,30 @@
+
+Sample Apps that have soap:headerfault
+======================================
+
+Manufacturer.wsdl
+Retailer.wsdl
+Warehouse.wsdl
+
+Sample Apps that have anonymouns type
+======================================
+
+LoggingFacility.xsd
+
+Sample Apps that have xsd:any
+=============================
+
+LoggingFacility.xsd
+
+
+=================================================================================
+
+Changes Done to wsi-raw.war in :jeeves/jaxrpc-wsi in order to get it deployed:
+
+1) mv *.wsdl *.xsd to WEB-INF/wsdl
+2) mv *.xml.gz mapping files to ../WEB-INF
+3) add WEB-INF/webservices.xml, sun-web.xml
+4) overwrite WEB-INF/web.xml with 109 web.xml
+5) add META-INF/application.xml, sun-application.xml
+
+Made it an ear file.
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/application.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/application.xml
new file mode 100644
index 0000000..ea2650a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/application.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application
+ version="1.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+
+ <description>WSI Sample Application description</description>
+ <display-name>WSISampleApp</display-name>
+ <module>
+ <web>
+ <web-uri>wsi-raw.war</web-uri>
+ <context-root>/wsi</context-root>
+ </web>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-application.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-application.xml
new file mode 100644
index 0000000..58ee9e9
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-application.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 J2EE Application 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application>
+ <web>
+ <web-uri>wsi-raw.war</web-uri>
+ <context-root>/wsi</context-root>
+ </web>
+ <unique-id>0</unique-id>
+</sun-application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-web.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-web.xml
new file mode 100644
index 0000000..21a0ce5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/sun-web.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-web-app>
+ <webservice-description>
+ <webservice-description-name>RetailerDescription</webservice-description-name>
+ <wsdl-publish-location>http://localhost:8080/wsi/scm/retailer?WSDL</wsdl-publish-location>
+ </webservice-description>
+ <webservice-description>
+ <webservice-description-name>ManufacturerDescription</webservice-description-name>
+ <wsdl-publish-location>http://localhost:8080/wsi/scm/manufacturer?WSDL</wsdl-publish-location>
+ </webservice-description>
+ <webservice-description>
+ <webservice-description-name>WarehouseDescription</webservice-description-name>
+ <wsdl-publish-location>http://localhost:8080/wsi/scm/warehouse?WSDL</wsdl-publish-location>
+ </webservice-description>
+ <webservice-description>
+ <webservice-description-name>LoggingDescription</webservice-description-name>
+ <wsdl-publish-location>http://localhost:8080/wsi/scm/logging?WSDL</wsdl-publish-location>
+ </webservice-description>
+</sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/web.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/web.xml
new file mode 100644
index 0000000..6633c3f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/web.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>WSI-Sample-Application</display-name>
+ <servlet>
+ <servlet-name>Retailer</servlet-name>
+ <servlet-class>com.sun.wsi.scm.retailer.RetailerPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ManufacturerC</servlet-name>
+ <servlet-class>com.sun.wsi.scm.manufacturer.ManufacturerCPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>WarehouseB</servlet-name>
+ <servlet-class>com.sun.wsi.scm.warehouse.WarehouseBPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Warehouse_Callback</servlet-name>
+ <servlet-class>com.sun.wsi.scm.manufacturer.WarehouseCallbackPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ManufacturerB</servlet-name>
+ <servlet-class>com.sun.wsi.scm.manufacturer.ManufacturerBPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>WarehouseA</servlet-name>
+ <servlet-class>com.sun.wsi.scm.warehouse.WarehouseAPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ManufacturerA</servlet-name>
+ <servlet-class>com.sun.wsi.scm.manufacturer.ManufacturerAPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Logging</servlet-name>
+ <servlet-class>com.sun.wsi.scm.logging.LoggingFacilityLogPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>WarehouseC</servlet-name>
+ <servlet-class>com.sun.wsi.scm.warehouse.WarehouseCPortTypeImpl</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Retailer</servlet-name>
+ <url-pattern>/scm/retailer</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Logging</servlet-name>
+ <url-pattern>/scm/logging</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>WarehouseA</servlet-name>
+ <url-pattern>/scm/warehousea</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>WarehouseB</servlet-name>
+ <url-pattern>/scm/warehouseb</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>WarehouseC</servlet-name>
+ <url-pattern>/scm/warehousec</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Warehouse_Callback</servlet-name>
+ <url-pattern>/scm/warehouse/callback</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ManufacturerA</servlet-name>
+ <url-pattern>/scm/manufacturera</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ManufacturerB</servlet-name>
+ <url-pattern>/scm/manufacturerb</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ManufacturerC</servlet-name>
+ <url-pattern>/scm/manufacturerc</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>60</session-timeout>
+ </session-config>
+</web-app>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/webservices.xml
new file mode 100644
index 0000000..5006ae6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/descriptors/webservices.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:retailerNS="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"
+ xmlns:manufacturerNS="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer.wsdl"
+ xmlns:warehouseNS="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ xmlns:loggingNS="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.wsdl"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>WSI-Sample-Application-Description</description>
+ <webservice-description>
+ <webservice-description-name>RetailerDescription</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/RetailerImpl.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>retailer.xml.gz</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>RetailerPort</port-component-name>
+ <wsdl-port>retailerNS:RetailerPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.retailer.RetailerPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>Retailer</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+
+ <webservice-description>
+ <webservice-description-name>ManufacturerDescription</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/ManufacturerImpl.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>manufacturer.xml.gz</jaxrpc-mapping-file>
+
+ <port-component>
+ <port-component-name>ManufacturerAPort</port-component-name>
+ <wsdl-port>manufacturerNS:ManufacturerAPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.manufacturer.ManufacturerPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ManufacturerA</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <port-component-name>ManufacturerBPort</port-component-name>
+ <wsdl-port>manufacturerNS:ManufacturerBPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.manufacturer.ManufacturerPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ManufacturerB</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <port-component-name>ManufacturerCPort</port-component-name>
+ <wsdl-port>manufacturerNS:ManufacturerCPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.manufacturer.ManufacturerPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>ManufacturerC</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <port-component-name>WarehouseCallbackPort</port-component-name>
+ <wsdl-port>manufacturerNS:WarehouseCallbackPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.manufacturer.WarehouseCallbackPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>Warehouse_Callback</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+
+ <webservice-description>
+ <webservice-description-name>WarehouseDescription</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/WarehouseImpl.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>warehouse.xml.gz</jaxrpc-mapping-file>
+
+ <port-component>
+ <port-component-name>WarehouseAPort</port-component-name>
+ <wsdl-port>warehouseNS:WarehouseAPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.warehouse.WarehouseShipmentsPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>WarehouseA</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <port-component-name>WarehouseBPort</port-component-name>
+ <wsdl-port>warehouseNS:WarehouseBPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.warehouse.WarehouseShipmentsPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>WarehouseB</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ <port-component>
+ <port-component-name>WarehouseCPort</port-component-name>
+ <wsdl-port>warehouseNS:WarehouseCPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.warehouse.WarehouseShipmentsPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>WarehouseC</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+
+ <webservice-description>
+ <webservice-description-name>LoggingDescription</webservice-description-name>
+ <wsdl-file>WEB-INF/wsdl/LoggingFacilityImpl.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>logging.xml.gz</jaxrpc-mapping-file>
+ <port-component>
+ <port-component-name>LoggingFacilityPort</port-component-name>
+ <wsdl-port>loggingNS:LoggingFacilityPort</wsdl-port>
+ <service-endpoint-interface>
+ com.sun.wsi.scm.logging.LoggingFacilityLogPortType
+ </service-endpoint-interface>
+ <service-impl-bean>
+ <servlet-link>Logging</servlet-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.wsdl
new file mode 100644
index 0000000..f40f62f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.wsdl
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:configurationType="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:documentation>
+ This WSDL document describes the configuration header to be used by all services except the Logger. This header
+ is part of a supply chain management system. It is used to demonstrate a web service that is
+ conformant with the Basic Profile and to show how different web service platforms can interoperate.
+ </wsdl:documentation>
+
+ <wsdl:types>
+ <xs:schema>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" schemaLocation="Configuration.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="ConfigurationFaultMessage">
+ <wsdl:documentation>
+ The Configuration fault header indicates why the configuration was invalid and enumerates all
+ of the service URLs which were not valid in Configuration header of the request message.
+ </wsdl:documentation>
+ <wsdl:part name="ConfigurationFault" element="configurationType:ConfigurationFault"/>
+ </wsdl:message>
+
+</wsdl:definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.xsd
new file mode 100644
index 0000000..d91d713
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configuration.xsd
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ elementFormDefault="qualified">
+ <xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"
+ schemaLocation="http://schemas.xmlsoap.org/soap/envelope/" />
+ <xs:annotation>
+ <xs:documentation>
+ This schema describes the types needed to describe the header common to all services. This
+ header is used to pass the configuration of the demo to the various web services, and does not convey
+ meaning required to implement a Supply Chain Management System.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleType name="ConfigurationEndpointRole">
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="LoggingFacility"/>
+ <xs:enumeration value="Retailer"/>
+ <xs:enumeration value="WarehouseA"/>
+ <xs:enumeration value="WarehouseB"/>
+ <xs:enumeration value="WarehouseC"/>
+ <xs:enumeration value="ManufacturerA"/>
+ <xs:enumeration value="ManufacturerB"/>
+ <xs:enumeration value="ManufacturerC"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ConfigurationEndpointType">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="Role" type="tns:ConfigurationEndpointRole" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:element name="Configuration" type="tns:ConfigurationType"/>
+ <xs:complexType name="ConfigurationType">
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ It is left to the application to make sure that this array contains one of each of the
+ role values enumerated in ConfigurationEndpointType.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:element name="UserId" type="xs:string" nillable="false"/>
+ <xs:element name="ServiceUrl" type="tns:ConfigurationEndpointType" nillable="false" minOccurs="8" maxOccurs="8"/>
+ </xs:sequence>
+ <xs:attribute ref="s:mustUnderstand" use="optional"/>
+ </xs:complexType>
+ <xs:element name="ConfigurationFault" type="tns:ConfigurationFaultType" />
+ <xs:complexType name="ConfigurationFaultType">
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ It is required that every ServiceUrl that is missing, contains a duplicate, or does not resolve to a
+ reachable service will be indicated in the ErroneousElement array.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:element name="Message" type="xs:string"/>
+ <xs:element name="ErroneousElement" type="tns:ConfigurationEndpointRole" minOccurs="0" maxOccurs="8"/>
+ </xs:sequence>
+ <xs:attribute ref="s:mustUnderstand"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.wsdl
new file mode 100644
index 0000000..9af2522
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.wsdl
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions name="SampleConfigurator"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.wsdl"
+ xmlns:cfg="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd"
+ xmlns:cfgn="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <wsdl:types>
+ <xs:schema>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd"
+ schemaLocation="Configurator.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ schemaLocation="Configuration.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getConfigurationOptionsRequest">
+ <wsdl:documentation>
+ This message is used to obtain all of the discovered showcase implementations of
+ the WS-I services. It contains useful information on which selections can be made,
+ such as platform, in addition to vital information about the choices, such as the
+ endpoints. The service may perform discovery in response to this message or may
+ return cached information. When the refresh bit is on, the implementation must
+ perform (re)discovery.
+ </wsdl:documentation>
+ <wsdl:part name="refresh" element="cfg:refresh"/>
+ </wsdl:message>
+
+ <wsdl:message name="getConfigurationOptionsResponse">
+ <wsdl:documentation>
+ This message is returned in response to getConfigurationOptions and contains
+ a list of alternative showcase implementations of the WS-I Basic Sample Application
+ Web services. The endpoints for the services and information about the service is
+ provided to aid in selection.
+ </wsdl:documentation>
+ <wsdl:part name="configOptions" element="cfg:configOptions"/>
+ </wsdl:message>
+
+ <wsdl:message name="configuratorFailedFault">
+ <wsdl:documentation>
+ This message is used to indicate the configurator was unable to obtain configuration options.
+ </wsdl:documentation>
+ <wsdl:part name="configError" element="cfg:configError"/>
+ </wsdl:message>
+
+ <wsdl:portType name="ConfiguratorPortType">
+ <wsdl:operation name="getConfigurationOptions">
+ <wsdl:input message="tns:getConfigurationOptionsRequest"/>
+ <wsdl:output message="tns:getConfigurationOptionsResponse"/>
+ <wsdl:fault message="tns:configuratorFailedFault" name="configuratorFailedFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="ConfiguratorBinding" type="tns:ConfiguratorPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="getConfigurationOptions">
+ <soap:operation soapAction="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.wsdl/getConfigurationOptions"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="configuratorFailedFault">
+ <soap:fault use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+</wsdl:definitions>
+<!--
+The following is an example of a SOAP message compliant with the above WSDL for the getConfigurationOptions request:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/envelope/">
+ <s:Body>
+ <m:refresh xmlns:m="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd">false</m:refresh>
+ </s:Body>
+</s:Envelope>
+
+
+The following is an example of a SOAP message compliant with the above WSDL for the getConfigurationOptions response:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/envelope/">
+ <s:Body>
+ <Q1:configOptions
+ xmlns:Q1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd">
+ <Q1:configOption>
+ <Q1:name>MyCo Retailer</Q1:name>
+ <Q1:selectionParms>platform=WebSphere;OS=Linux</Q1:selectionParms>
+ <Q1:configurationEndpoint Role="Retailer">http://www.myco.com/services/WS-I/Retailer<Q1:configurationEndpoint>
+ </Q1:configOption>
+ <Q1:configOption>
+ <Q1:name>OtherCo Retailer</Q1:name>
+ <Q1:selectionParms>platform=WebSphere;OS=Windows</Q1:selectionParms>
+ <Q1:configurationEndpoint Role="Retailer">http://www.otherco.com/services/WS-I/Retailer<Q1:configurationEndpoint>
+ </Q1:configOption>
+ </Q1:configOptions>
+ </s:Body>
+</s:Envelope>
+
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.xsd
new file mode 100644
index 0000000..aeded83
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Configurator.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd" xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configurator.xsd" xmlns:cfgn="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" schemaLocation="Configuration.xsd"/>
+ <xs:element name="configOption" type="tns:ConfigOptionType"/>
+ <xs:complexType name="ConfigOptionType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="selectionParms" type="xs:string"/>
+ <xs:element name="configurationEndpoint" type="cfgn:ConfigurationEndpointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="configOptions" type="tns:ConfigOptionsType"/>
+ <xs:complexType name="ConfigOptionsType">
+ <xs:sequence>
+ <xs:element ref="tns:configOption" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="refresh" type="xs:boolean"/>
+ <xs:element name="configError" type="xs:string"/>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.wsdl
new file mode 100644
index 0000000..9cabefc
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.wsdl
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:log="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.wsdl"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:documentation>
+ This WSDL document describes the LoggingFacility service for the WS-I Basic Sample Application. This
+ service is part of a supply chain management system. It is used to demonstrate a web service that is
+ conformant with the Basic Profile and to show how different web service platforms can interoperate.
+ </wsdl:documentation>
+
+ <wsdl:types>
+ <xs:schema>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd" schemaLocation="LoggingFacility.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="logEventRequest">
+ <wsdl:part name="Document" element="log:logEventRequestElement"/>
+ </wsdl:message>
+
+ <wsdl:message name="getEventsRequest">
+ <wsdl:part name="Document" element="log:getEventsRequestElement"/>
+ </wsdl:message>
+
+ <wsdl:message name="getEventsResponse">
+ <wsdl:part name="Document" element="log:getEventsResponseElement"/>
+ </wsdl:message>
+
+ <wsdl:message name="getEventsRepositoryMissingFault">
+ <wsdl:part name="Document" element="log:getEventsFaultElement"/>
+ </wsdl:message>
+
+ <wsdl:portType name="LoggingFacilityLogPortType">
+ <wsdl:operation name="logEvent">
+ <wsdl:documentation>Append an entry to the system log.</wsdl:documentation>
+ <wsdl:input message="tns:logEventRequest"/>
+ </wsdl:operation>
+ <wsdl:operation name="getEvents">
+ <wsdl:documentation>Retrieve entries from the system log with the specified userId.</wsdl:documentation>
+ <wsdl:input message="tns:getEventsRequest"/>
+ <wsdl:output message="tns:getEventsResponse"/>
+ <wsdl:fault name="RepositoryMissingFault" message="tns:getEventsRepositoryMissingFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="LoggingFacilitySoapBinding" type="tns:LoggingFacilityLogPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <wsdl:operation name="logEvent">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+ <wsdl:operation name="getEvents">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="RepositoryMissingFault">
+ <soap:fault use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+</wsdl:definitions>
+
+<!--
+The following is an example of a SOAP message compliant with the above WSDL for the logEvent request:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
+ <s:Body>
+ <m:logEventRequestElement xmlns:m="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd">
+ <m:DemoUserID>My Id is 72+1111,AF37C.sdsdsd</m:DemoUserID>
+ <m:ServiceID>WarehouseA:http://www.ws-i.org/SA/Warehouse.asmx</m:ServiceID>
+ <m:EventID>3</m:EventID>
+ <m:EventDescription>Initiating operation ShipGoods.</m:EventDescription>
+ <d:Detail xmlns:d="http://my/namespace/">
+ <d:Customer>D22845-W8N349Y-tky</d:Customer>
+ <d:ProductId>123123123</d:ProductId>
+ <d:Quantity>12</d:Quantity>
+ </d:Detail>
+ </m:logEventRequestElement>
+ </s:Body>
+</s:Envelope>
+
+
+The following is an example of a SOAP message compliant with the above WSDL for the getEvents request:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/envelope/">
+ <s:Body>
+ <m:getEventsRequestElement xmlns:m="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd">
+ <m:DemoUserID>My Id is 72+1111,AF37C.sdsdsd</m:DemoUserID>
+ </m:getEventsRequestElement>
+ </s:Body>
+</s:Envelope>
+
+
+The following is an example of a SOAP message compliant with the above WSDL for the getEvents response:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
+ <s:Body>
+ <m:getEventsResponseElement xmlns:m="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd">
+ <m:LogEntry>
+ <m:Timestamp>2002-08-09T13:45:51</m:Timestamp>
+ <m:ServiceID>WarehouseA:http://www.ws-i.org/SA/Warehouse.asmx</m:ServiceID>
+ <m:EventID>3</m:EventID>
+ <m:EventDescription>Initiating operation ShipGoods.</m:EventDescription>
+ <d:Detail xmlns:d="http://my/namespace/">
+ <d:Customer>D22845-W8N349Y-tky</d:Customer>
+ <d:ProductId>123123123</d:ProductId>
+ <d:Quantity>12</d:Quantity>
+ </d:Detail>
+ </m:LogEntry>
+ <m:LogEntry>
+ <m:Timestamp>2002-08-09T13:47:04</m:Timestamp>
+ <m:ServiceID>WarehouseA:http://www.ws-i.org/SA/Warehouse.asmx</m:ServiceID>
+ <m:EventID>4</m:EventID>
+ <m:EventDescription>Completing operation ShipGoods.</m:EventDescription>
+ </m:LogEntry>
+ </m:getEventsResponseElement>
+ </s:Body>
+</s:Envelope>
+
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.xsd
new file mode 100644
index 0000000..5a72331
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/LoggingFacility.xsd
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ xmlns:log="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/LoggingFacility.xsd">
+
+ <xs:element name="logEventRequestElement" type="log:logEventRequestType"/>
+ <xs:complexType name="logEventRequestType">
+ <xs:sequence>
+ <xs:element name="DemoUserID" type="xs:string"/>
+ <xs:element name="ServiceID" type="xs:string"/>
+ <xs:element name="EventID" type="xs:string"/>
+ <xs:element name="EventDescription" type="xs:string"/>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="getEventsRequestElement" type="log:getEventsRequestType"/>
+ <xs:complexType name="getEventsRequestType">
+ <xs:sequence>
+ <xs:element name="DemoUserID" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="getEventsResponseElement" type="log:getEventsResponseType"/>
+ <xs:complexType name="getEventsResponseType">
+ <xs:sequence>
+ <xs:element name="LogEntry" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Timestamp" type="xs:dateTime"/>
+ <xs:element name="ServiceID" type="xs:string"/>
+ <xs:element name="EventID" type="xs:string"/>
+ <xs:element name="EventDescription" type="xs:string"/>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="getEventsFaultElement" type="log:getEventsFaultType"/>
+ <xs:complexType name="getEventsFaultType">
+ <xs:sequence>
+ <xs:element name="Reason">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="RepositoryMissing"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Manufacturer.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Manufacturer.wsdl
new file mode 100644
index 0000000..ca11207
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Manufacturer.wsdl
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:cb="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer/CallBack"
+ xmlns:ct="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ xmlns:cfg="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl"
+ xmlns:po="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd"
+ xmlns:sn="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer.wsdl"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer.wsdl">
+
+ <wsdl:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl"
+ location="Configuration.wsdl"/>
+
+ <wsdl:types>
+ <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" schemaLocation="Configuration.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd" schemaLocation="ManufacturerPO.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd" schemaLocation="ManufacturerSN.xsd"/>
+ </xs:schema>
+ <xs:schema targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer/CallBack" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="StartHeader" type="cb:StartHeaderType"/>
+ <xs:element name="CallbackHeader" type="cb:CallbackHeaderType"/>
+ <xs:element name="CallbackFault" type="cb:CallbackFaultType"/>
+ <xs:complexType name="StartHeaderType">
+ <xs:sequence>
+ <xs:element minOccurs="1" maxOccurs="1" name="conversationID" type="xs:string"/>
+ <xs:element minOccurs="1" maxOccurs="1" name="callbackLocation" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CallbackHeaderType">
+ <xs:sequence>
+ <xs:element minOccurs="1" maxOccurs="1" name="conversationID" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CallbackFaultType">
+ <xs:sequence>
+ <xs:element name="Reason">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="notFound"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element minOccurs="1" maxOccurs="1" name="conversationID" type="xs:string"/>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="POSubmit">
+ <wsdl:documentation>
+ A purchase order.
+ </wsdl:documentation>
+ <wsdl:part name="PurchaseOrder" element="po:PurchaseOrder"/>
+ <wsdl:part name="ConfigurationHeader" element="ct:Configuration"/>
+ <wsdl:part name="StartHeader" element="cb:StartHeader"/>
+ </wsdl:message>
+
+ <wsdl:message name="ackPO">
+ <wsdl:documentation>
+ A response of true indicates the purchase order has been accepted for processing.
+ </wsdl:documentation>
+ <wsdl:part name="Response" element="po:ackPO"/>
+ </wsdl:message>
+
+ <wsdl:message name="submitPOFault">
+ <wsdl:documentation>
+ A reason code for the rejection of a given PO that can be matched through the conversationID
+ in the callback section of the SOAP header.
+ </wsdl:documentation>
+ <wsdl:part name="POFault" element="po:submitPOFault"/>
+ </wsdl:message>
+
+ <wsdl:message name="SNSubmit">
+ <wsdl:documentation>
+ A shipment notification.
+ </wsdl:documentation>
+ <wsdl:part name="ShipmentNotice" element="sn:ShipmentNotice"/>
+ <wsdl:part name="ConfigurationHeader" element="ct:Configuration"/>
+ <wsdl:part name="CallbackHeader" element="cb:CallbackHeader"/>
+ </wsdl:message>
+
+ <wsdl:message name="processPOFault">
+ <wsdl:documentation>
+ Alternative to SNSubmit, indicates a reason for the rejection of a given PO after
+ having been acknowledged by the Manufacturer. Contains callback information with
+ which to find the original replenishment request.
+ </wsdl:documentation>
+ <wsdl:part name="processPOFault" element="po:submitPOFault"/>
+ <wsdl:part name="ConfigurationHeader" element="ct:Configuration"/>
+ <wsdl:part name="CallbackHeader" element="cb:CallbackHeader"/>
+ </wsdl:message>
+
+ <wsdl:message name="ackSN">
+ <wsdl:documentation>
+ A response of true indicates the shipment notice has been accepted for processing.
+ </wsdl:documentation>
+ <wsdl:part name="Response" element="sn:ackSN"/>
+ </wsdl:message>
+
+ <wsdl:message name="Callback">
+ <wsdl:documentation>
+ To be used in SOAP headers for relating two req/resp message pairs sent asynchronously.
+ The CallbackFault indicates a reason for the rejection of the second req/resp pair.
+ </wsdl:documentation>
+ <wsdl:part name="CallbackFault" element="cb:CallbackFault"/>
+ </wsdl:message>
+
+ <wsdl:portType name="ManufacturerPortType">
+ <wsdl:operation name="submitPO">
+ <wsdl:documentation>Submit a purchase order for specified items to the manufacturer.</wsdl:documentation>
+ <wsdl:input message="tns:POSubmit"/>
+ <wsdl:output message="tns:ackPO"/>
+ <wsdl:fault name="POFault" message="tns:submitPOFault"/>
+ <wsdl:fault name="ConfigurationFault" message="cfg:ConfigurationFaultMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="WarehouseCallbackPortType">
+ <wsdl:operation name="submitSN">
+ <wsdl:documentation>Submit a shipment notice for specified items to the retailer.</wsdl:documentation>
+ <wsdl:input message="tns:SNSubmit"/>
+ <wsdl:output message="tns:ackSN"/>
+ <wsdl:fault name="ConfigurationFault" message="cfg:ConfigurationFaultMessage"/>
+ <wsdl:fault name="CallbackFault" message="tns:Callback"/>
+ </wsdl:operation>
+ <wsdl:operation name="errorPO">
+ <wsdl:documentation>Notify warehouse there was an error in processing a submitted PO.</wsdl:documentation>
+ <wsdl:input message="tns:processPOFault"/>
+ <wsdl:output message="tns:ackPO"/>
+ <wsdl:fault name="ConfigurationFault" message="cfg:ConfigurationFaultMessage"/>
+ <wsdl:fault name="CallbackFault" message="tns:Callback"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="ManufacturerSoapBinding" type="tns:ManufacturerPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="submitPO">
+ <soap:operation/>
+ <wsdl:input>
+ <soap:body parts="PurchaseOrder" use="literal"/>
+ <soap:header message="tns:POSubmit" part="ConfigurationHeader" use="literal">
+ <soap:headerfault message="cfg:ConfigurationFaultMessage" part="ConfigurationFault" use="literal" />
+ </soap:header>
+ <soap:header message="tns:POSubmit" part="StartHeader" use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="POFault">
+ <soap:fault use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="WarehouseCallbackSoapBinding" type="tns:WarehouseCallbackPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="submitSN">
+ <soap:operation/>
+ <wsdl:input>
+ <soap:body parts="ShipmentNotice" use="literal"/>
+ <soap:header message="tns:SNSubmit" part="ConfigurationHeader" use="literal">
+ <soap:headerfault message="cfg:ConfigurationFaultMessage" part="ConfigurationFault" use="literal" />
+ </soap:header>
+ <soap:header message="tns:SNSubmit" part="CallbackHeader" use="literal">
+ <soap:headerfault message="tns:Callback" part="CallbackFault" use="literal"/>
+ </soap:header>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body parts="Response" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="errorPO">
+ <soap:operation/>
+ <wsdl:input>
+ <soap:body parts="processPOFault" use="literal"/>
+ <soap:header message="tns:processPOFault" part="CallbackHeader" use="literal">
+ <soap:headerfault message="tns:Callback" part="CallbackFault" use="literal"/>
+ </soap:header>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body parts="Response" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:documentation>
+ This WSDL document describes the Manufacturer service for the WS-I Basic Sample Application. This service
+ is part of a supply chain management system. It is used to demonstrate a web service that is
+ conformant with the Basic Profile and to show how different web service platforms can interoperate.
+ </wsdl:documentation>
+
+</wsdl:definitions>
+
+
+<!-- The following is an example of a SOAP request message compliant with the above WSDL:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <soapenv:Header>
+ <ns1:Configuration xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd">
+ <ns1:UserId>Some user ID</ns1:UserId>
+ <ns1:ServiceUrl Role="LoggingFacility">http://localhost:999/WS-I_Sample/services/LoggingFacility</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="Retailer">http://localhost:999/WS-I_Sample/services/Retailer</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="WarehouseA">http://localhost:999/WS-I_Sample/services/WarehouseA</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="WarehouseB">http://localhost:999/WS-I_Sample/services/WarehouseB</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="WarehouseC">http://localhost:999/WS-I_Sample/services/WarehouseC</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="ManufacturerA">http://localhost:999/WS-I_Sample/services/ManufacturerA</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="ManufacturerB">http://localhost:999/WS-I_Sample/services/ManufacturerB</ns1:ServiceUrl>
+ <ns1:ServiceUrl Role="ManufacturerC">http://localhost:999/WS-I_Sample/services/ManufacturerC</ns1:ServiceUrl>
+ </ns1:Configuration>
+ <ns2:StartHeader xmlns:ns2="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer/CallBack">
+ <ns2:conversationID>1</ns2:conversationID>
+ <ns2:callbackLocation>http://localhost:999/WS-I_Sample/services/WarehouseCallBack</ns2:callbackLocation>
+ </ns2:StartHeader>
+ </soapenv:Header>
+ <soapenv:Body>
+ <PurchaseOrder xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd">
+ <orderNum>1</orderNum>
+ <customerRef>ABCD999999999EFG</customerRef>
+ <items>
+ <Item>
+ <ID>605002</ID>
+ <qty>18</qty>
+ <price>100.0</price>
+ </Item>
+ </items>
+ <total>0.0</total>
+ </PurchaseOrder>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+and the reply from the Manufacturer:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <soapenv:Body>
+ <ackPO xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd">true</ackPO>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+and the callback request:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <soapenv:Header>
+ <ns1:CallbackHeader xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/Manufacturer/CallBack">
+ <ns1:conversationID>1</ns1:conversationID>
+ </ns1:CallbackHeader>
+ <ns2:Configuration xmlns:ns2="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd">
+ <ns2:UserId>Some user ID</ns2:UserId>
+ <ns2:ServiceUrl Role="LoggingFacility">http://localhost:999/WS-I_Sample/services/LoggingFacility</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="Retailer">http://localhost:999/WS-I_Sample/services/Retailer</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="WarehouseA">http://localhost:999/WS-I_Sample/services/WarehouseA</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="WarehouseB">http://localhost:999/WS-I_Sample/services/WarehouseB</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="WarehouseC">http://localhost:999/WS-I_Sample/services/WarehouseC</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="ManufacturerA">http://localhost:999/WS-I_Sample/services/ManufacturerA</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="ManufacturerB">http://localhost:999/WS-I_Sample/services/ManufacturerB</ns2:ServiceUrl>
+ <ns2:ServiceUrl Role="ManufacturerC">http://localhost:999/WS-I_Sample/services/ManufacturerC</ns2:ServiceUrl>
+ </ns2:Configuration>
+ </soapenv:Header>
+ <soapenv:Body>
+ <ShipmentNotice xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd">
+ <shipNum>1</shipNum>
+ <orderNum>1</orderNum>
+ <customerRef>ABCD999999999EFG</customerRef>
+ <items>
+ <Item>
+ <ID>605002</ID>
+ <qty>18</qty>
+ <price>100.0</price>
+ </Item>
+ </items>
+ <total>0.0</total>
+ </ShipmentNotice>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+and the Callback reply:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <soapenv:Body>
+ <ackSN xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd">true</ackSN>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerPO.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerPO.xsd
new file mode 100644
index 0000000..c9d59d5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerPO.xsd
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd" xmlns:po="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">Purchase Order schema for Manufacturer system of WS-I sample application</xs:documentation>
+ </xs:annotation>
+ <xs:element name="PurchaseOrder" type="po:PurchOrdType"/>
+ <xs:complexType name="PurchOrdType">
+ <xs:sequence>
+ <xs:element name="orderNum" type="xs:string"/>
+ <xs:element name="customerRef" type="po:CustomerReferenceType"/>
+ <xs:element name="items" type="po:ItemList"/>
+ <xs:element name="total" type="xs:float"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="CustomerReferenceType">
+ <xs:restriction base="xs:normalizedString">
+ <xs:maxLength value="20"/>
+ <xs:pattern value="[A-D][0-9]{5}-[0-9A-Z]{7}-[a-z]{3}#*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ItemList">
+ <xs:sequence>
+ <xs:element name="Item" type="po:Item" nillable="false" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Item">
+ <xs:sequence>
+ <xs:element name="ID" type="xs:nonNegativeInteger"/>
+ <xs:element name="qty" type="xs:unsignedShort"/>
+ <xs:element name="price" type="xs:float"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ackPO" type="xs:boolean"/>
+ <xs:element name="submitPOFault" type="po:submitPOFaultType"/>
+ <xs:complexType name="submitPOFaultType">
+ <xs:sequence>
+ <xs:element name="Reason">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="MalformedOrder"/>
+ <xs:enumeration value="InvalidProduct"/>
+ <xs:enumeration value="InvalidQty"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerSN.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerSN.xsd
new file mode 100644
index 0000000..87be655
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/ManufacturerSN.xsd
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd" xmlns:sn="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">Shipment Notification schema for Manufacturer system of WS-I sample application</xs:documentation>
+ </xs:annotation>
+ <xs:element name="ShipmentNotice" type="sn:ShipmentNoticeType"/>
+ <xs:complexType name="ShipmentNoticeType">
+ <xs:sequence>
+ <xs:element name="shipNum" type="xs:string"/>
+ <xs:element name="orderNum" type="xs:string"/>
+ <xs:element name="customerRef" type="sn:CustomerReferenceType"/>
+ <xs:element name="items" type="sn:ItemList"/>
+ <xs:element name="total" type="xs:float"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:simpleType name="CustomerReferenceType">
+ <xs:restriction base="xs:normalizedString">
+ <xs:maxLength value="20"/>
+ <xs:pattern value="[A-D][0-9]{5}-[0-9A-Z]{7}-[a-z]{3}#*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ItemList">
+ <xs:sequence>
+ <xs:element name="Item" type="sn:Item" nillable="false" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="Item">
+ <xs:sequence>
+ <xs:element name="ID" type="xs:nonNegativeInteger"/>
+ <xs:element name="qty" type="xs:unsignedShort"/>
+ <xs:element name="price" type="xs:float"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ackSN" type="xs:boolean"/>
+ <xs:element name="submitSNFault" type="sn:submitSNFaultType"/>
+ <xs:complexType name="submitSNFaultType">
+ <xs:sequence>
+ <xs:element name="Reason">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="UnkknownOrder"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailCatalog.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailCatalog.xsd
new file mode 100644
index 0000000..436799e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailCatalog.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd"
+targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">Catalog schema for Retailer component of WS-I</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="catalog" type="tns:CatalogType"/>
+ <xsd:element name="comment" type="xsd:string"/>
+ <xsd:complexType name="CatalogType">
+ <xsd:sequence>
+ <xsd:element name="Item" type="tns:CatalogItem" maxOccurs="10"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CatalogItem">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="category" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="brand" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="productNumber">
+ <xsd:restriction base="xsd:integer">
+ <xsd:minInclusive value="1"/>
+ <xsd:maxInclusive value="999999"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailOrder.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailOrder.xsd
new file mode 100644
index 0000000..7699be1
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/RetailOrder.xsd
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"
+targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">Definition of PartsOrder types for Retailer component of WS-I</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType name="PartsOrderType">
+ <xsd:sequence>
+ <xsd:element name="Item" type="tns:PartsOrderItem" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartsOrderItem">
+ <xsd:sequence>
+ <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="quantity" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartsOrderResponseType">
+ <xsd:sequence>
+ <xsd:element name="Item" type="tns:PartsOrderResponseItem" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartsOrderResponseItem">
+ <xsd:sequence>
+ <xsd:element name="productNumber" type="tns:productNumber" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="quantity" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="price" type="xsd:decimal" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CustomerDetailsType">
+ <xsd:sequence>
+ <xsd:element name="custnbr" type="tns:CustomerReferenceType" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="street1" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="street2" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="city" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="state" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="zip" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="country" type="xsd:string" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="productNumber">
+ <xsd:restriction base="xsd:integer">
+ <xsd:minInclusive value="1"/>
+ <xsd:maxInclusive value="999999"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="CustomerReferenceType">
+ <xsd:restriction base="xsd:normalizedString">
+ <xsd:maxLength value="20"/>
+ <xsd:pattern value="[A-D][0-9]{5}-[0-9A-Z]{7}-[a-z]{3}#*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="InvalidProductCode" type="tns:InvalidProductCodeType"/>
+ <xsd:complexType name="InvalidProductCodeType">
+ <xsd:sequence>
+ <xsd:element name="Reason">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="InvalidProductCode"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="ProductNumber" type="tns:productNumber" />
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Retailer.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Retailer.wsdl
new file mode 100644
index 0000000..1085e22
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Retailer.wsdl
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:cfg="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ xmlns:cfgw="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl"
+ xmlns:cat="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd"
+ xmlns:order="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"
+targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ >
+
+<wsdl:documentation>
+ This WSDL document describes the Retailer service for the WS-I Basic Sample Application. This
+ service is part of a supply chain management system. It is used to demonstrate a web service that is conformant
+ with the Basic Profile and to show how different web service platforms can interoperate.
+</wsdl:documentation>
+
+ <wsdl:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl" location="Configuration.wsdl"/>
+
+ <wsdl:types>
+ <xs:schema>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd" schemaLocation="RetailCatalog.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd" schemaLocation="RetailOrder.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" schemaLocation="Configuration.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCatalogRequest" />
+ <wsdl:message name="getCatalogResponse">
+ <wsdl:part name="return" type="cat:CatalogType">
+ <wsdl:documentation>the product catalog</wsdl:documentation>
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="submitOrderRequest">
+ <wsdl:part name="PartsOrder" type="order:PartsOrderType"><wsdl:documentation>XML structure holding product/quantity pairs</wsdl:documentation></wsdl:part>
+ <wsdl:part name="CustomerDetails" type="order:CustomerDetailsType"/>
+ <wsdl:part name="ConfigurationHeader" element="cfg:Configuration"/>
+ </wsdl:message>
+ <wsdl:message name="submitOrderResponse">
+ <wsdl:part name="return" type="order:PartsOrderResponseType">
+ <wsdl:documentation>XML structure holding product/quantity ordered pairs, with optional failure message</wsdl:documentation>
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="BadOrderFault"/>
+ <wsdl:message name="InvalidProductCodeFault">
+ <wsdl:part name="InvalidProductCode" element="order:InvalidProductCode"/>
+ </wsdl:message>
+
+ <wsdl:portType name="RetailerPortType">
+ <wsdl:operation name="getCatalog">
+ <wsdl:documentation>returns a product catalog</wsdl:documentation>
+ <wsdl:input message="tns:getCatalogRequest" name="getCatalogRequest"/>
+ <wsdl:output message="tns:getCatalogResponse" name="getCatalogResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="submitOrder">
+ <wsdl:documentation>Accept an order for quantities of multiple products</wsdl:documentation>
+ <wsdl:input message="tns:submitOrderRequest" name="submitOrderRequest"/>
+ <wsdl:output message="tns:submitOrderResponse" name="submitOrderResponse"/>
+ <wsdl:fault name="BadOrder" message="tns:BadOrderFault"/>
+ <wsdl:fault name="InvalidProductCode" message="tns:InvalidProductCodeFault"/>
+ <wsdl:fault name="ConfigurationFault" message="cfgw:ConfigurationFaultMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="RetailerSoapBinding" type="tns:RetailerPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getCatalog">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="submitOrder">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"
+ parts="PartsOrder CustomerDetails" />
+ <soap:header message="tns:submitOrderRequest" part="ConfigurationHeader" use="literal" wsdl:required="true" >
+ <soap:headerfault message="cfgw:ConfigurationFaultMessage" part="ConfigurationFault" use="literal" />
+ </soap:header>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl"/>
+ </wsdl:output>
+ <wsdl:fault name="BadOrder">
+ <soap:fault use="literal"/>
+ </wsdl:fault>
+ <wsdl:fault name="InvalidProductCode">
+ <soap:fault use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+</wsdl:definitions>
+
+
+<!-- The following is an example of a getCatalog SOAP request message compliant with the above WSDL:
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+<SOAP-ENV:Body>
+<ns1:getCatalog xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl">
+</ns1:getCatalog>
+</SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+The following is an example of a getCatalog SOAP response message compliant with the above WSDL:
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+<SOAP-ENV:Body>
+<ns1:getCatalogResponse xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl">
+<return>
+ <Item xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd">
+ <name>TV,Brand1</name>
+ <description>24", Color, Advanced Velocit Scan Modular</description>
+ <productNumber>605001</productNumber>
+ <category>TV</category>
+ <brand>Brand1</brand>
+ <price>299.95</price>
+ </Item>
+ <Item xmlns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailCatalog.xsd">
+ <name>TV, Brand2</name>
+ <description>32", Super Slim Flat Panel Plasma</description>
+ <productNumber>605002</productNumber>
+ <category>TV</category>
+ <brand>Brand2</brand>
+ <price>1499.99</price>
+ </Item>
+</return>
+</ns1:getCatalogResponse>
+</SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+
+
+The following is an example of a submitOrder SOAP request message compliant with the above WSDL:
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+<SOAP-ENV:Header>
+<h:Configuration
+ xmlns:h="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd">
+ <h:UserId>griddell@bowstreet.com</h:UserId>
+ <h:ServiceUrl Role="LoggingFacility">http://example1/SampleApp/SCM/LoggingFacility</h:ServiceUrl>
+ <h:ServiceUrl Role="Retailer">http://example2/wsi/soaprpc/wsi/RetailerImpl</h:ServiceUrl>
+ <h:ServiceUrl Role="WarehouseA">http://example3/wsi/soaprpc/wsi/WarehouseAImpl</h:ServiceUrl>
+ <h:ServiceUrl Role="WarehouseB">http://example4/wsi/soaprpc/wsi/WarehouseBImpl</h:ServiceUrl>
+ <h:ServiceUrl Role="WarehouseC">http://example5/wsi/soaprpc/wsi/WarehouseCImpl</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerA">http://example6/ws-i_sample/ManufacturerA</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerB">http://example7/ws-i_sample/ManufacturerB</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerC">http://example8/ws-i_sample/ManufacturerC</h:ServiceUrl>
+</h:Configuration>
+</SOAP-ENV:Header>
+<SOAP-ENV:Body>
+<ns1:submitOrder xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl">
+<PartsOrder xmlns:p="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd">
+ <p:Item>
+ <p:productNumber>605006</p:productNumber>
+ <p:quantity>182</p:quantity>
+ <p:price>3.99</p:price>
+ </p:Item>
+ <p:Item><p:productNumber>605002</p:productNumber>
+ <p:quantity>4</p:quantity>
+ <p:price>3.99</p:price>
+ </p:Item>
+ <p:Item>
+ <p:productNumber>605003</p:productNumber>
+ <p:quantity>82</p:quantity>
+ <p:price>7.99</p:price>
+ </p:Item>
+</PartsOrder>
+<CustomerDetails xmlns:c="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd">
+ <c:custnbr>ABCD999999999EFG</c:custnbr>
+ <c:name>Joe Bloggs</c:name>
+ <c:street1 />
+ <c:city />
+ <c:state>NH</c:state>
+ <c:zip>03870</c:zip>
+ <c:country>USA</c:country>
+</CustomerDetails>
+</ns1:submitOrder>
+</SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+The following is an example of a submitOrder SOAP response message that is compliant with the WSDL:
+
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+<SOAP-ENV:Body>
+<ns1:submitOrderResponse xmlns:ns1="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Retailer.wsdl">
+<return xmlns:ns2="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/RetailOrder.xsd">
+ <ns2:Item>
+ <ns2:productNumber>605002</ns2:productNumber>
+ <ns2:quantity>4</ns2:quantity>
+ <ns2:price>3.99</ns2:price>
+ <ns2:comment>in stock from WarehouseA</ns2:comment>
+ </ns2:Item>
+ <ns2:Item>
+ <ns2:productNumber>605006</ns2:productNumber>
+ <ns2:quantity>0</ns2:quantity>
+ <ns2:price>0</ns2:price>
+ <ns2:comment>insufficient stock</ns2:comment>
+ </ns2:Item>
+ <ns2:Item>
+ <ns2:productNumber>605003</ns2:productNumber>
+ <ns2:quantity>0</ns2:quantity>
+ <ns2:price>0</ns2:price>
+ <ns2:comment>insufficient stock</ns2:comment>
+ </ns2:Item>
+</return>
+</ns1:submitOrderResponse>
+</SOAP-ENV:Body>
+</SOAP-ENV:Envelope>
+
+
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.wsdl
new file mode 100644
index 0000000..bc63a24
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.wsdl
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<wsdl:definitions
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:c="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl"
+ xmlns:ct="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
+ xmlns:wh="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd"
+ xmlns:tns="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.wsdl" location="Configuration.wsdl"/>
+
+ <wsdl:documentation>
+ This WSDL document describes the Warehouse service for the WS-I Basic Sample Application. This service
+ is part of a supply chain management system. It is used to demonstrate a web service that is
+ conformant with the Basic Profile and to show how different web service platforms can interoperate.
+ </wsdl:documentation>
+
+ <wsdl:types>
+ <xs:schema>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd" schemaLocation="Configuration.xsd"/>
+ <xs:import namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd" schemaLocation="Warehouse.xsd"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="ShipGoodsRequest">
+ <wsdl:part name="ItemList" type="wh:ItemList"/>
+ <wsdl:part name="Customer" type="wh:CustomerReferenceType"/>
+ <wsdl:part name="ConfigurationHeader" element="ct:Configuration"/>
+ </wsdl:message>
+
+ <wsdl:message name="ShipGoodsResponse">
+ <wsdl:documentation>
+ A response of true indicates the goods have been shipped. A response of false
+ indicates the warehouse either does not carry that part or does not have enough stock to
+ fill the requested quantity.
+ </wsdl:documentation>
+ <wsdl:part name="Response" type="wh:ItemShippingStatusList"/>
+ </wsdl:message>
+
+ <wsdl:portType name="WarehouseShipmentsPortType">
+ <wsdl:operation name="ShipGoods">
+ <wsdl:documentation>Ship the specified number of the specified part to the specified customer.</wsdl:documentation>
+ <wsdl:input message="tns:ShipGoodsRequest"/>
+ <wsdl:output message="tns:ShipGoodsResponse"/>
+ <wsdl:fault name="ConfigurationFault" message="c:ConfigurationFaultMessage"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="WarehouseSoapBinding" type="tns:WarehouseShipmentsPortType">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ <wsdl:operation name="ShipGoods">
+ <soap:operation
+ soapAction="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"/>
+ <wsdl:input>
+ <soap:body use="literal"
+ namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ parts="ItemList Customer" />
+ <soap:header message="tns:ShipGoodsRequest" part="ConfigurationHeader" use="literal">
+ <soap:headerfault message="c:ConfigurationFaultMessage" part="ConfigurationFault" use="literal" />
+ </soap:header>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"
+ namespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+</wsdl:definitions>
+<!-- The following is an example of a SOAP request message compliant with the above WSDL:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/envelope/">
+ <s:Header>
+ <h:Configuration
+ xmlns:h="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd">
+ <h:UserId>8bf7ec9a-f3b2-4f39-9807-c55c860a5983</h:UserId>
+ <h:ServiceUrl Role="WarehouseA">http://www.ws-i.org/BasicSampleApp/WarehouseA</h:ServiceUrl>
+ <h:ServiceUrl Role="LoggingFacility">http://www.ws-i.org/BasicSampleApp/LoggingFacility</h:ServiceUrl>
+ <h:ServiceUrl Role="WarehouseC">http://www.ws-i.org/BasicSampleApp/WarehouseC</h:ServiceUrl>
+ <h:ServiceUrl Role="Retailer">http://www.ws-i.org/BasicSampleApp/Retailer</h:ServiceUrl>
+ <h:ServiceUrl Role="WarehouseB">http://www.ws-i.org/BasicSampleApp/WarehouseB</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerA">http://www.ws-i.org/BasicSampleApp/ManufacturerA</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerB">http://www.ws-i.org/BasicSampleApp/ManufacturerB</h:ServiceUrl>
+ <h:ServiceUrl Role="ManufacturerC">http://www.ws-i.org/BasicSampleApp/ManufacturerC</h:ServiceUrl>
+ </h:Configuration>
+ </s:Header>
+ <s:Body>
+ <ns1:ShipGoods xmlns:ns1="http://www,ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ xmlns:ns2="http://www,ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd">
+ <ItemList>
+ <ns2:Item>
+ <ns2:ProductNumber>605006</ns2:ProductNumber>
+ <ns2:Quantity>23</ns2:Quantity>
+ </ns2:Item>
+ <ns2:Item>
+ <ns2:ProductNumber>605007</ns2:ProductNumber>
+ <ns2:Quantity>22</ns2:Quantity>
+ </ns2:Item>
+ </ItemList>
+ <Customer>D22845-W8N349Y-tky</Customer>
+ </ns1:ShipGoods>
+ </s:Body>
+</s:Envelope>
+
+The following is an example of a SOAP response message that is compliant with the WSDL:
+
+<s:Envelope xmlns:s="http://schemas.xmlsoap.org/envelope/">
+ <s:Body>
+ <ns1:ShipGoodsResponse xmlns:ns1="http://www,ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.wsdl"
+ xmlns:ns2="http://www,ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd">
+ <Response>
+ <ns2:ItemStatus>
+ <ns2:ProductNumber>605006</ns2:ProductNumber>
+ <ns2:Status>false</ns2:Status>
+ </ns2:ItemStatus>
+ <ns2:ItemStatus>
+ <ns2:ProductNumber>605007</ns2:ProductNumber>
+ <ns2:Status>true</ns2:Status>
+ </ns2:ItemStatus>
+ </Response>
+ </ns1:ShipGoodsResponse>
+ </s:Body>
+</s:Envelope>
+
+-->
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.xsd b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.xsd
new file mode 100644
index 0000000..28cf3f3
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi-sampleapp/wsdls/Warehouse.xsd
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ xmlns:wh="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd"
+ targetNamespace="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Warehouse.xsd">
+
+ <xs:simpleType name="CustomerReferenceType">
+ <xs:restriction base="xs:normalizedString">
+ <xs:maxLength value="20"/>
+ <xs:pattern value="[A-D][0-9]{5}-[0-9A-Z]{7}-[a-z]{3}#*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="Item">
+ <xs:sequence>
+ <xs:element name="ProductNumber" type="xs:nonNegativeInteger"/>
+ <xs:element name="Quantity" type="xs:unsignedShort"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ItemList">
+ <xs:sequence>
+ <xs:element name="Item" type="wh:Item" minOccurs="1" maxOccurs="unbounded" nillable="false"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ItemShippingStatus">
+ <xs:sequence>
+ <xs:element name="ProductNumber" type="xs:nonNegativeInteger"/>
+ <xs:element name="Status" type="xs:boolean"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ItemShippingStatusList">
+ <xs:sequence>
+ <xs:element name="ItemStatus" type="wh:ItemShippingStatus" minOccurs="1" maxOccurs="unbounded" nillable="false"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/README b/appserver/tests/appserv-tests/devtests/webservice/wsi/README
new file mode 100644
index 0000000..07e7f94
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/README
@@ -0,0 +1,9 @@
+
+this directory contains some unit tests that are meant to touch
+some wsi compliant areas wrt faultcode.
+
+we now have rpc/literal style only.
+
+since CTS does not have any tests on faultcode handling using
+an ejb endpoint, we will exclusive test out just web services
+with ejb endpoints
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.properties b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.properties
new file mode 100644
index 0000000..0f79eab
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="faultcode"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.xml
new file mode 100644
index 0000000..49b7904
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/build.xml
@@ -0,0 +1,149 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="faultcode test" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-appclient"/>
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="wscompile-ejb"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/faultcode">
+ <fileset dir="output/faultcode"
+ includes="SimpleTestService.class, SimpleTest.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_ejb.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/faultcodeejb">
+ <fileset dir="output/faultcodeejb"
+ includes="SimpleTestService.class, SimpleTest.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="faultcode.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="FaultCodeMapping_appclient.xml"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="FaultCodeMapping_appclient.xml,META-INF/wsdl/**,faultcode/*.class" />
+
+ </antcall>
+ <copy todir="${build.classes.dir}"
+ file="FaultCodeMapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="FaultCodeMapping_ejb.xml,META-INF/wsdl/**,faultcodeejb/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="faultcode"/>
+ <delete dir="faultcodeejb"/>
+ <delete file="FaultCodeMapping_ejb.xml"/>
+ <delete file="FaultCodeMapping_appclient.xml"/>
+ <delete file="jaxrpc.log"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/faultcodeejb/FaultCodeTest"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="gen-mapping-appclient" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping FaultCodeMapping_appclient.xml wscompile_config_appclient.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping FaultCodeMapping_ejb.xml wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/Client.java
new file mode 100644
index 0000000..d7beedf
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/Client.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2002, 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 faultcode;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-faultcode");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-faultcodeID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ SimpleTestService testService =
+ (SimpleTestService) ic.lookup("java:comp/env/service/faultcode");
+ SimpleTest test = testService.getSimpleTest();
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+
+ //SingleWildcardType c = new SingleWildcardType(8, "Single", new SOAPElement());
+/*
+ SingleWildcardType c = new SingleWildcardType(8, "Single", "BUGGGY how to do single soapelement");
+
+ String[] dd = new String[2];
+ dd[0] = "wild";
+ dd[1] = "card";
+ RepeatedWildcardType d = new RepeatedWildcardType(88, "Repeated", new SOAPElement[0]);
+
+ int ret = test.test1(888, c, d);
+
+ System.out.println("RETURN LUCKY NUMBER = " + ret);
+*/
+ stat.addStatus("xsdanyclient main", stat.PASS);
+
+ } catch (Exception ex) {
+ System.out.println("xsdany client test failed");
+ ex.printStackTrace();
+ stat.addStatus("xsdanyclient main", stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/MANIFEST.MF
new file mode 100644
index 0000000..cb2a281
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: xsdany.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/config.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/config.xml
new file mode 100644
index 0000000..2bfe80e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="XsdAnyMapping_ejb.xml"
+ wsdlLocation="xsdany.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application-client.xml
new file mode 100644
index 0000000..25ff5b5
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my faultcode app client</description>
+ <display-name>faultcodeClient</display-name>
+ <service-ref>
+ <description>faultcode service ref</description>
+ <service-ref-name>service/faultcode</service-ref-name>
+ <service-interface>faultcode.TestService</service-interface>
+ <wsdl-file>META-INF/wsdl/faultcode.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>FaultCodeMapping_appclient.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:test">servicens:TestService
+ </service-qname>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application.xml
new file mode 100644
index 0000000..645b137
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>FaultCodeApp</display-name>
+ <module>
+ <java>faultcode-client.jar</java>
+ </module>
+ <module>
+ <ejb>faultcode-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..0717702
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>FaultCodeEjb</ejb-name>
+ <service-endpoint>faultcodeejb.Test</service-endpoint>
+ <ejb-class>faultcodeejb.FaultCodeEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>FaultCodeEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..5a9d210
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-application-client.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/faultcode</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>faultcode.Test</service-endpoint-interface>
+ <stub-property>
+ <name>com.sun.enterprise.webservice.client.transport.log</name>
+ <value>file:jaxrpc.log</value>
+ </stub-property>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:TestService</namespaceURI>
+ <localpart>TestService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..01e36b6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>FaultCodeEjb</ejb-name>
+ <jndi-name>FaultCodeEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>TestPort</port-component-name>
+ <endpoint-address-uri>faultcode/FaultCodeTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/webservices.xml
new file mode 100644
index 0000000..a796148
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>FaultCodeWebServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/faultcode.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>FaultCodeMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>TestPort</port-component-name>
+ <wsdl-port xmlns:faultcodens="urn:test">faultcodens:TestPort</wsdl-port>
+ <service-endpoint-interface>faultcodeejb.Test</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>FaultCodeEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/ejb/FaultCodeEJB.java b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/ejb/FaultCodeEJB.java
new file mode 100644
index 0000000..2c69132
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/ejb/FaultCodeEJB.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002, 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 faultcodeejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+import javax.xml.rpc.handler.MessageContext;
+
+public class FaultCodeEJB implements SessionBean {
+ private SessionContext sc;
+
+ public FaultCodeEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In FaultCodeEJB::ejbCreate !!");
+ }
+
+ public String echoString(String body) {
+ System.out.println("In FaultCodeEJB:: echoString = " + body);
+ return body;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/faultcode.wsdl b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/faultcode.wsdl
new file mode 100644
index 0000000..c04d055
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/faultcode.wsdl
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions name="urn:SimpleTest"
+ targetNamespace="urn:SimpleTest"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="urn:SimpleTest"
+ xmlns:s="http://SimpleTest.org/xsd"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <types/>
+
+ <message name="echoString">
+ <part name="body" type="xsd:string"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="return" type="xsd:string"/>
+ </message>
+
+ <portType name="SimpleTest">
+ <operation name="echoString" parameterOrder="body" >
+ <input message="tns:echoString"/>
+ <output message="tns:echoStringResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="SimpleTestBinding" type="tns:SimpleTest">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoString">
+ <soap:operation soapAction="http://SimpleTest.org/"/>
+ <input> <soap:body use="literal" namespace="http://SimpleTest.org/xsd"/> </input>
+ <output> <soap:body use="literal" namespace="http://SimpleTest.org/xsd"/> </output>
+ </operation>
+ </binding>
+
+ <service name="SimpleTestService">
+ <port name="SimpleTest" binding="tns:SimpleTestBinding">
+ <soap:address location="http://localhost:1024/rpclit/SimpleTest"/>
+ </port>
+ </service>
+</definitions>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_appclient.xml
new file mode 100644
index 0000000..59bb4ea
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="faultcode.wsdl"
+ packageName="faultcode"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_ejb.xml
new file mode 100644
index 0000000..f064674
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/wsi/faultcode/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="faultcode.wsdl"
+ packageName="faultcodeejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.properties b/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.properties
new file mode 100644
index 0000000..b8b6a3a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.properties
@@ -0,0 +1,36 @@
+<!--
+
+ 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
+
+-->
+
+
+<property name="module" value="xsdany"/>
+<property name="appname" value="${module}"/>
+<property name="assemble" value="${build.classes.dir}/archive"/>
+<property name="test.client"
+ value="Client"/>
+<property name="application.xml" value="descriptor/application.xml"/>
+<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
+<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
+<property name="webservices.xml" value="descriptor/webservices.xml"/>
+<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
+<property name="application-client.xml"
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"
+ value="descriptor/sun-application-client.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
+<property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.xml
new file mode 100644
index 0000000..c68415a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/build.xml
@@ -0,0 +1,149 @@
+<!--
+
+ Copyright (c) 2002, 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
+
+-->
+
+<!DOCTYPE project [
+<!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml">
+<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
+<!ENTITY testproperties SYSTEM "file:./build.properties">
+]>
+
+<project name="xsd test" default="usage" basedir=".">
+
+ <!-- include common.xml and testcommon.xml -->
+ &commonSetup;
+ &commonBuild;
+ &testproperties;
+
+ <target name="all" depends="clean,build,deploy,run,undeploy"/>
+
+
+ <target name="run.wscompile">
+ <exec executable="${WSCOMPILE}" failonerror="true" >
+ <arg line="-source 1.1.2 ${wscompile.command}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="">
+ <antcall target="compile-common">
+ <param name="src" value="client"/>
+ </antcall>
+ <antcall target="compile-common">
+ <param name="src" value="ejb"/>
+ </antcall>
+ </target>
+
+ <target name="build" depends="init-common, clean">
+ <antcall target="gen-mapping-appclient"/>
+ <antcall target="gen-mapping-ejb"/>
+ <antcall target="wscompile-appclient"/>
+ <antcall target="wscompile-ejb"/>
+ <antcall target="assemble"/>
+ </target>
+
+ <target name="wscompile-appclient" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_appclient.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/xsdany">
+ <fileset dir="output/xsdany"
+ includes="TestService.class, Test.class, SingleWildcardType.class, RepeatedWildcardType.class, Test1RequestType.class, Test1ResponseType.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="wscompile-ejb" depends="init-common">
+ <mkdir dir="output"/>
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-import -keep -d output -s output -classpath . wscompile_config_ejb.xml"/>
+ </antcall>
+ <copy todir="${build.classes.dir}/xsdanyejb">
+ <fileset dir="output/xsdanyejb"
+ includes="TestService.class, Test.class, SingleWildcardType.class, RepeatedWildcardType.class, Test1RequestType.class, Test1ResponseType.class"/>
+ </copy>
+ <delete dir="output"/>
+ </target>
+
+ <target name="assemble" depends="init-common, compile">
+ <copy todir="${build.classes.dir}/META-INF/wsdl"
+ file="xsdany.wsdl"/>
+ <copy todir="${build.classes.dir}"
+ file="XsdAnyMapping_appclient.xml"/>
+ <antcall target="appclient-jar-common">
+ <param name="appclientjar.classes"
+ value="XsdAnyMapping_appclient.xml,META-INF/wsdl/**,xsdany/*.class" />
+
+ </antcall>
+ <copy todir="${build.classes.dir}"
+ file="XsdAnyMapping_ejb.xml"/>
+ <antcall target="ejb-jar-common">
+ <param name="ejbjar.classes"
+ value="XsdAnyMapping_ejb.xml,META-INF/wsdl/**,xsdanyejb/*.class" />
+
+ </antcall>
+ <antcall target="ear-common" />
+ </target>
+
+ <target name="deploy"
+ depends="init-common">
+ <antcall target="deploy-common"/>
+ </target>
+
+ <target name="clean" depends="init-common">
+ <antcall target="clean-common"/>
+ <delete dir="output"/>
+ <delete dir="xsdany"/>
+ <delete dir="xsdanyejb"/>
+ <delete file="XsdAnyMapping_ejb.xml"/>
+ <delete file="XsdAnyMapping_appclient.xml"/>
+ <delete file="jaxrpc.log"/>
+ </target>
+
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="http://${http.host}:${http.port}/xsdanyejb/XsdAnyTest"/>
+ </antcall>
+ </target>
+
+ <target name="undeploy" depends="init-common">
+ <antcall target="undeploy-common"/>
+ </target>
+
+ <target name="gen-mapping-appclient" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping XsdAnyMapping_appclient.xml wscompile_config_appclient.xml"/>
+ </antcall>
+ </target>
+
+ <target name="gen-mapping-ejb" depends="init-common">
+ <antcall target="run.wscompile">
+ <param name="wscompile.command"
+ value="-gen -cp . -mapping XsdAnyMapping_ejb.xml wscompile_config_ejb.xml"/>
+ </antcall>
+ </target>
+
+ <target name="usage">
+ <echo>
+ Usage:
+ ant all (Executes the WebServices test)
+ </echo>
+ </target>
+</project>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/Client.java b/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/Client.java
new file mode 100644
index 0000000..95bed97
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/Client.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2002, 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 xsdany;
+
+import java.io.*;
+import java.util.*;
+import javax.naming.*;
+import javax.xml.rpc.Stub;
+import javax.xml.soap.SOAPElement;
+import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
+
+public class Client {
+
+ private static SimpleReporterAdapter stat =
+ new SimpleReporterAdapter("appserv-tests");
+
+ public static void main (String[] args) {
+ stat.addDescription("webservices-xsdany");
+ Client client = new Client();
+ client.doTest(args);
+ stat.printSummary("webservices-xsdanyID");
+ }
+
+ public void doTest(String[] args) {
+ try {
+
+ String targetEndpointAddress = args[0];
+
+ Context ic = new InitialContext();
+
+ TestService testService =
+ (TestService) ic.lookup("java:comp/env/service/xsdany");
+ Test test = testService.getTestPort();
+
+ ((Stub)test)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
+ targetEndpointAddress);
+
+ System.out.println("endpoint address = " + targetEndpointAddress);
+
+ //SingleWildcardType c = new SingleWildcardType(8, "Single", new SOAPElement());
+ SingleWildcardType c = new SingleWildcardType(8, "Single", "BUGGGY how to do single soapelement");
+
+ String[] dd = new String[2];
+ dd[0] = "wild";
+ dd[1] = "card";
+ RepeatedWildcardType d = new RepeatedWildcardType(88, "Repeated", new SOAPElement[0]);
+
+ int ret = test.test1(888, c, d);
+
+ System.out.println("RETURN LUCKY NUMBER = " + ret);
+ stat.addStatus("xsdanyclient main", stat.PASS);
+
+ } catch (Exception ex) {
+ System.out.println("xsdany client test failed");
+ ex.printStackTrace();
+ stat.addStatus("xsdanyclient main", stat.FAIL);
+ }
+ }
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/MANIFEST.MF b/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/MANIFEST.MF
new file mode 100644
index 0000000..cb2a281
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/client/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: xsdany.Client
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/config.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/config.xml
new file mode 100644
index 0000000..2bfe80e
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <j2eeMappingFile
+ location="XsdAnyMapping_ejb.xml"
+ wsdlLocation="xsdany.wsdl"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application-client.xml
new file mode 100644
index 0000000..5dca417
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
+ <description>This is my xsdany app client</description>
+ <display-name>xsdanyClient</display-name>
+ <service-ref>
+ <description>xsdany service ref</description>
+ <service-ref-name>service/xsdany</service-ref-name>
+ <service-interface>xsdany.TestService</service-interface>
+ <wsdl-file>META-INF/wsdl/xsdany.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>XsdAnyMapping_appclient.xml</jaxrpc-mapping-file>
+ <service-qname xmlns:servicens="urn:test">servicens:TestService
+ </service-qname>
+ </service-ref>
+</application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application.xml
new file mode 100644
index 0000000..9329a49
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/application.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<application version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
+ <description>Application description</description>
+ <display-name>XsdAnyApp</display-name>
+ <module>
+ <java>xsdany-client.jar</java>
+ </module>
+ <module>
+ <ejb>xsdany-ejb.jar</ejb>
+ </module>
+</application>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/ejb-jar.xml
new file mode 100644
index 0000000..e09a41c
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/ejb-jar.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
+ <display-name>Ejb1</display-name>
+ <enterprise-beans>
+ <session>
+ <ejb-name>XsdAnyEjb</ejb-name>
+ <service-endpoint>xsdanyejb.Test</service-endpoint>
+ <ejb-class>xsdanyejb.XsdAnyEJB</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ </session>
+ </enterprise-beans>
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>XsdAnyEjb</ejb-name>
+ <method-intf>ServiceEndpoint</method-intf>
+ <method-name>*</method-name>
+ </method>
+ <trans-attribute>Required</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-application-client.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-application-client.xml
new file mode 100644
index 0000000..6c87a9d
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-application-client.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 Application Client 1.4//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-application-client_1_4-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-application-client>
+ <service-ref>
+ <service-ref-name>service/xsdany</service-ref-name>
+ <port-info>
+ <service-endpoint-interface>xsdany.Test</service-endpoint-interface>
+ </port-info>
+ <service-qname>
+ <namespaceURI>urn:TestService</namespaceURI>
+ <localpart>TestService</localpart>
+ </service-qname>
+ </service-ref>
+</sun-application-client>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-ejb-jar.xml
new file mode 100644
index 0000000..33e357f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/sun-ejb-jar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<sun-ejb-jar>
+ <enterprise-beans>
+ <unique-id>0</unique-id>
+ <ejb>
+ <ejb-name>XsdAnyEjb</ejb-name>
+ <jndi-name>XsdAnyEjb</jndi-name>
+ <pass-by-reference>false</pass-by-reference>
+ <is-read-only-bean>false</is-read-only-bean>
+ <refresh-period-in-seconds>-1</refresh-period-in-seconds>
+ <gen-classes/>
+ <webservice-endpoint>
+ <port-component-name>TestPort</port-component-name>
+ <endpoint-address-uri>xsdanyejb/XsdAnyTest</endpoint-address-uri>
+ </webservice-endpoint>
+ </ejb>
+ </enterprise-beans>
+</sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/webservices.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/webservices.xml
new file mode 100644
index 0000000..121427a
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/descriptor/webservices.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
+ version="1.1">
+ <description>desc</description>
+ <webservice-description>
+ <webservice-description-name>XsdAnyWebServiceEjb</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/xsdany.wsdl</wsdl-file>
+ <jaxrpc-mapping-file>XsdAnyMapping_ejb.xml</jaxrpc-mapping-file>
+ <port-component>
+ <description>port component description</description>
+ <port-component-name>TestPort</port-component-name>
+ <wsdl-port xmlns:xsdanyns="urn:test">xsdanyns:TestPort</wsdl-port>
+ <service-endpoint-interface>xsdanyejb.Test</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>XsdAnyEjb</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/ejb/XsdAnyEJB.java b/appserver/tests/appserv-tests/devtests/webservice/xsdany/ejb/XsdAnyEJB.java
new file mode 100644
index 0000000..3a21b68
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/ejb/XsdAnyEJB.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2002, 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 xsdanyejb;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.EJBException;
+import javax.naming.*;
+import javax.xml.rpc.handler.MessageContext;
+
+public class XsdAnyEJB implements SessionBean {
+ private SessionContext sc;
+
+ public XsdAnyEJB(){}
+
+ public void ejbCreate() throws RemoteException {
+ System.out.println("In XsdAnyEJB::ejbCreate !!");
+ }
+
+ public int test1(int a,
+ xsdanyejb.SingleWildcardType c,
+ xsdanyejb.RepeatedWildcardType d)
+ throws java.rmi.RemoteException
+ {
+ MessageContext msgContext = sc.getMessageContext();
+ System.out.println("msgContext = " + msgContext);
+
+ System.out.println("XsdAnyEJB.test1() called with ");
+ System.out.println("a = " + a);
+
+ System.out.println("SingleWildcardType.foo = " + c.getFoo());
+ System.out.println("SingleWildcardType.bar = " + c.getBar());
+ //System.out.println("SingleWildcardType._any = " + c.get_any());
+ System.out.println("SingleWildcardType._any = " + c.getVoo());
+
+ System.out.println("RepeatedWildcardType.foo = " + d.getFoo());
+ System.out.println("RepeatedWildcardType.bar = " + d.getBar());
+ System.out.println("RepeatedWildcardType._any = " + d.get_any());
+
+ System.out.println("GoogleEJB returning " + a);
+
+ return a;
+ }
+
+ public void setSessionContext(SessionContext sc) {
+
+ this.sc = sc;
+ }
+
+ public void ejbRemove() throws RemoteException {}
+
+ public void ejbActivate() {}
+
+ public void ejbPassivate() {}
+
+}
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_appclient.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_appclient.xml
new file mode 100644
index 0000000..881891f
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_appclient.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="xsdany.wsdl"
+ packageName="xsdany"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_ejb.xml b/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_ejb.xml
new file mode 100644
index 0000000..bbeb29b
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/wscompile_config_ejb.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<configuration
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <wsdl
+ location="xsdany.wsdl"
+ packageName="xsdanyejb"/>
+</configuration>
diff --git a/appserver/tests/appserv-tests/devtests/webservice/xsdany/xsdany.wsdl b/appserver/tests/appserv-tests/devtests/webservice/xsdany/xsdany.wsdl
new file mode 100644
index 0000000..6f44fc6
--- /dev/null
+++ b/appserver/tests/appserv-tests/devtests/webservice/xsdany/xsdany.wsdl
@@ -0,0 +1,116 @@
+<!--
+
+ Copyright (c) 2017, 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
+
+-->
+
+<definitions
+ name="HelloTest"
+ targetNamespace="urn:test"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ttns="urn:test:types"
+ xmlns:tns="urn:test">
+
+ <types>
+ <xsd:schema targetNamespace="urn:test:types">
+
+ <xsd:element name="Test1Request" type="ttns:Test1RequestType"/>
+ <xsd:complexType name="Test1RequestType">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:int"/>
+<!-- XXX BUG. Can't handle this
+ <xsd:element name="b" type="ttns:ComplexTypeSimpleContentType"/>
+-->
+ <xsd:element name="c" type="ttns:SingleWildcardType"/>
+ <xsd:element name="d" type="ttns:RepeatedWildcardType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="Test1Response" type="ttns:Test1ResponseType"/>
+ <xsd:complexType name="Test1ResponseType">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- XXX BUG. Can't handle this.
+ <xsd:complexType name="ComplexTypeSimpleContentType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="foo" type="xsd:int"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+-->
+
+ <xsd:complexType name="SingleWildcardType">
+ <xsd:sequence>
+ <xsd:element name="foo" type="xsd:int"/>
+ <xsd:element name="bar" type="xsd:string"/>
+ <xsd:element name="voo" type="xsd:string"/>
+<!-- XXX BUG. How to write the client??
+ <xsd:any namespace="##other" processContents="lax"/>
+-->
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="RepeatedWildcardType">
+ <xsd:sequence>
+ <xsd:element name="foo" type="xsd:int"/>
+ <xsd:element name="bar" type="xsd:string"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </types>
+
+ <message name="Test1Request">
+ <part name="params" element="ttns:Test1Request"/>
+ </message>
+
+ <message name="Test1Response">
+ <part name="result" element="ttns:Test1Response"/>
+ </message>
+
+ <portType name="Test">
+ <operation name="test1">
+ <input message="tns:Test1Request"/>
+ <output message="tns:Test1Response"/>
+ </operation>
+ </portType>
+
+ <binding name="TestBinding" type="tns:Test">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="test1">
+ <soap:operation soapAction="urn:test:hello"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="TestService">
+ <port name="TestPort" binding="tns:TestBinding">
+ <soap:address location="http://test.org/test"/>
+ </port>
+ </service>
+
+</definitions>